FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Bashified fscking.

---
rc.sysinit | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index d54b9bb..91ee03a 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -181,7 +181,7 @@ fi
status "Mounting Root Read-only" /bin/mount -n -o remount,ro /

FORCEFSCK=
-[ -f /forcefsck ] && FORCEFSCK="-- -f"
+[[ -f /forcefsck ]] && FORCEFSCK="-- -f"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpf s,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs"

fsck_reboot() {
@@ -192,7 +192,7 @@ fsck_reboot() {
exit 0
}

-if [ -x /sbin/fsck ]; then
+if [[ -x /sbin/fsck ]]; then
stat_busy "Checking Filesystems"
FSCK_OUT=/dev/stdout
FSCK_ERR=/dev/stdout
@@ -200,11 +200,11 @@ if [ -x /sbin/fsck ]; then
run_hook sysinit_prefsck
/sbin/fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
fsckret=$?
- if [ ${fsckret} -gt 1 ]; then
+ if ((fsckret > 1)); then
stat_fail
fi
run_hook sysinit_postfsck
- if [ $((${fsckret}&2)) -eq 2 ]; then
+ if (( ( fsckret & 2) == 2)); then
echo
echo "********************** REBOOT REQUIRED *********************"
echo "* *"
@@ -214,8 +214,7 @@ if [ -x /sbin/fsck ]; then
echo
/bin/sleep 15
fsck_reboot
- fi
- if [ ${fsckret} -gt 1 -a ${fsckret} -ne 32 ]; then
+ elif ((fsckret > 1 && fsckret != 32)); then
echo
echo "***************** FILESYSTEM CHECK FAILED ****************"
echo "* *"
--
1.7.1
 
Old 07-16-2010, 12:00 PM
Thomas Bächler
 
Default Bashified fscking.

Am 30.06.2010 23:47, schrieb Victor Lowther:
> ---
> rc.sysinit | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)

This is one of those patches with no logic changes and just sh->bash
conversion that should be part of the big one.
 

Thread Tools




All times are GMT. The time now is 10:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org