summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2006-02-06 01:22:22 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-06 01:22:22 +0000
commit983378a2d3f3042997cbfb85683b238760bd9896 (patch)
tree02f82190d0ea646e61117eb690d0d7b47d4b7a66 /packages/initscripts/initscripts-1.0
parent76107d774ec7a96b7788d2f2b98b5621a04cfe71 (diff)
initscripts-slugos: modify the slugos checkroot.sh not to hang on fsck failure in 1.0
slugos-init: add a single_user_ok function in /etc/default/functions in 0.10 sysvinit: update slugos rcS with new options in 2.86 - this is to fix the fsck of the rootfs so that it will actually work safely on machines with no console.
Diffstat (limited to 'packages/initscripts/initscripts-1.0')
-rw-r--r--packages/initscripts/initscripts-1.0/slugos/checkroot.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh
index 806379f274..4c826b49fa 100644
--- a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh
+++ b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh
@@ -79,6 +79,9 @@ fi
if test -f /fastboot || test "$ROOTFSCK" != yes
then
test "$ROOTFSCK" = yes && echo "Fast boot, no filesystem check"
+elif test ! -x /sbin/fsck -a ! -x /usr/sbin/fsck
+then
+ echo "/etc/init.d/checkroot.sh: no fsck"
else
leds disk-1 slow
#
@@ -128,8 +131,13 @@ else
leds system panic
beep -r 5
# Start a single user shell on the console
- /sbin/sulogin $CONSOLE
- reboot -f
+ if single_user_ok
+ then
+ sulogin $CONSOLE
+ reboot -f
+ else
+ echo "/etc/init.d/checkroot.sh: fsck failed, continuing boot"
+ fi
fi
else
echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!"