summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-06-19 02:51:31 +0000
committerMiles Bader <miles@gnu.org>1996-06-19 02:51:31 +0000
commitc76d22285c0fc4c10bc1814a2617f36fee013b20 (patch)
tree3f0758c569f0464cd6f6af3b467310946dbd0d2c
parent06d8fa4db5f6bed417b8815bb0bb991c46b30677 (diff)
Understand special more status codes for signals from fsck.
Fix some messages. Factor out date.
-rw-r--r--daemons/rc.sh37
1 files changed, 17 insertions, 20 deletions
diff --git a/daemons/rc.sh b/daemons/rc.sh
index 71b52525..63ced2d0 100644
--- a/daemons/rc.sh
+++ b/daemons/rc.sh
@@ -7,8 +7,7 @@ then
echo Fast boot ... skipping disk checks
elif [ $1x = autobootx ]
then
- echo Automatic reboot in progress...
- date
+ echo Automatic boot in progress...
# Find the filesystem by a kludge, and extract the root device name.
fsargs=`ps -MaxHww --fmt=%command | grep exec-server-task | head -1`
@@ -19,40 +18,38 @@ then
fsck.$type -p /dev/r$dev
case $? in
-
-# Successful completion
+ # Successful completion
0)
- date
;;
-
-# Filesystem modified
+ # Filesystem modified
1 | 2)
fsysopts / -uw
- date
;;
-
-# Fsck couldn't fix it.
+ # Fsck couldn't fix it.
4 | 8)
- echo "Automatic reboot failed... help!"
+ echo "Automatic boot failed... help!"
exit 1
;;
-
-# SIGINT
- 130)
- echo "Reboot interrupted"
+ # Signal that really interrupted something
+ 20 | 130 | 131)
+ echo "Boot interrupted"
exit 1
;;
-
-# Oh dear.
+ # Special `let fsck finish' interruption (SIGQUIT)
+ 12)
+ echo "Boot interrupted (filesystem checks complete)"
+ exit 1
+ ;;
+ # Oh dear.
*)
- echo "Unknown error in reboot"
+ echo "Unknown error during fsck"
exit 1
;;
esac
-else
- date
fi
+date
+
# Until new hostname functions are in place
test -r /etc/hostname && hostname `cat /etc/hostname`