diff options
Diffstat (limited to 'packages/initscripts')
-rw-r--r-- | packages/initscripts/initscripts-1.0/slugos/checkroot.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh index be640fd254..3943f13427 100644 --- a/packages/initscripts/initscripts-1.0/slugos/checkroot.sh +++ b/packages/initscripts/initscripts-1.0/slugos/checkroot.sh @@ -134,10 +134,18 @@ else # Start a single user shell on the console if single_user_ok then - sulogin -t 300 $CONSOLE - # assume the system is ok now... + 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 - echo "... continuing boot" fi else echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!" |