diff options
author | Rod Whitby <rod@whitby.id.au> | 2006-02-06 02:46:40 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-06 02:46:40 +0000 |
commit | 13fe1a5480c8bc85a9a751672ae4d5c6295533a0 (patch) | |
tree | 0477f64bd4758019adeb4604a0598bbbc268339c /packages/initscripts/initscripts-1.0 | |
parent | 9b188ea2600bce6ed35559b21677bd8b7223f5a8 (diff) | |
parent | a56f5680381313b9a12a3ba133c5cb7a2154aa67 (diff) |
merge of 2eccf1b9297e1bdfb05d568694f7c92afa03eb9e
and 9fe7f397fe86e4dfdbe20606d124c3211e58b813
Diffstat (limited to 'packages/initscripts/initscripts-1.0')
-rw-r--r-- | packages/initscripts/initscripts-1.0/slugos/checkroot.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh index 806379f274..c70855ee43 100644 --- a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh +++ b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh @@ -4,6 +4,7 @@ # Version: @(#)checkroot.sh 2.84 25-Jan-2002 miquels@cistron.nl # +. /etc/default/functions . /etc/default/rcS # @@ -62,7 +63,7 @@ exec 0>&9 9>&- # We don't test whether we're running a 2.[0123].x kernel and md # since that's plain too old. -if test "$DOSWAP" = yes +if test "$DOSWAP" != no then swaps="$(blkid -t TYPE=swap -o device 2>/dev/null)" if test -n "$swaps" @@ -79,6 +80,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 +132,20 @@ 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 -t 600 $CONSOLE + # if this exits with SIGALRM (which happens to be 142) the + # timeout happened, do not, then, reboot! + if test $? -ne 142 + then + reboot -f + else + echo "/etc/init.d/checkroot.sh: sulogin timeout, continuing boot" + fi + 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!" |