From 920bffaf7e0915f8faadb4090d18a23875dca793 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 16 Mar 1999 07:38:19 +0000 Subject: rewrite fsck so you don't get FAILED on a passed check --- rc.d/rc.sysinit | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 21c6e7a5..15a756f2 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -52,11 +52,22 @@ if [ -f /forcefsck ]; then fi if [ ! -f /fastboot ]; then - action "Checking root filesystem" fsck -V -T -a $fsckoptions / + STRING="Checking root filesystem" + echo $STRING + initlog -c "fsck -T -a $fsckoptions /" rc=$? + if [ "$rc" = "0" ]; then + success "$STRING" + echo + elif [ "$rc" = "1" ]; then + passed "$STRING" + echo + fi + # A return of 2 or higher means there were serious problems. if [ $rc -gt 1 ]; then + failure "$STRING" echo echo echo "*** An error occurred during the file system check." @@ -200,12 +211,21 @@ fi # Check filesystems if [ ! -f /fastboot ]; then - action "Checking filesystems" fsck -V -T -R -A -a $fsckoptions - + STRING="Checking filesystems" + echo $STRING + initlog -c "fsck -T -R -A -a $fsckoptions" rc=$? + if [ "$rc" = "0" ]; then + success "$STRING" + echo + elif [ "$rc" = "1" ]; then + passed "$STRING" + echo + fi # A return of 2 or higher means there were serious problems. if [ $rc -gt 1 ]; then + failure "$STRING" echo echo echo "*** An error occurred during the file system check." -- cgit v1.2.1