summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0/slugos
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2006-02-06 02:48:51 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-06 02:48:51 +0000
commitdf9021a741b54e4504ba2e639b582b808994a2b4 (patch)
tree456ac557f011f11d84e71aba6ec8e6f0899d3dd0 /packages/initscripts/initscripts-1.0/slugos
parent951a6530af92b32af59d8c5e637a0462e6698b86 (diff)
parent28ae043187520daaa291ce8fc068dae9aee40334 (diff)
merge of ffcf1e664e4c623df8d1843978006676812e0bca
and e1959e48d26e0499e408ad374dceffa4f1055500
Diffstat (limited to 'packages/initscripts/initscripts-1.0/slugos')
-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 a26b9ffa37..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
#
@@ -133,8 +134,15 @@ else
# Start a single user shell on the console
if single_user_ok
then
- sulogin $CONSOLE
- reboot -f
+ 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