aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-03 19:34:29 +0000
committerBill Nottingham <notting@redhat.com>1999-02-03 19:34:29 +0000
commit78f1af4fcbcc1193db5e9db036359e14cc98afd9 (patch)
treed4e80f4f61ef4d6f7d436b49ac7f113182a82ca9 /rc.d/init.d/halt
parentd503a6fe70268f6b451a80b3fc89641f33491e9e (diff)
downloadinitscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.gz
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.bz2
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.tar.xz
initscripts-78f1af4fcbcc1193db5e9db036359e14cc98afd9.zip
more initlog changes; wait a little longer for kill -TERM
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt23
1 files changed, 12 insertions, 11 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 552f8f16..d902d105 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -30,36 +30,37 @@ esac
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
-echo "Sending all processes the TERM signal..."
-kill -15 -1
+action "Sending all processes the TERM signal..." kill -15 -1
sleep 5
-echo "Sending all processes the KILL signal.."
-kill -9 -1
+action "Sending all processes the KILL signal.." kill -9 -1
# Write to wtmp file before unmounting /var
halt -w
# Turn off swap, then unmount file systems.
-echo "Turning off swap and accounting"
-swapoff -a
+action "Turning off swap and accounting" swapoff -a
[ -x /sbin/accton ] && /sbin/accton
-echo "Unmounting file systems"
-umount -a -f
+action "Unmounting file systems" umount -a -f
mount -n -o remount,ro /
# turn off raid
if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
- /sbin/raidstop -a
+ action "Turning off RAID" /sbin/raidstop -a
fi
-echo "Remounting remaining filesystems (if any) readonly"
+# Remount read only anything that's left mounted.
+#echo "Remounting remaining filesystems (if any) readonly"
mount | awk '/ext2/ { print $3 }' | while read line; do
mount -n -o ro,remount $line
done
# Now halt or reboot.
echo "$message"
-[ -f /fastboot ] && echo "On the next boot fsck will be skipped."
+if [ -f /fastboot ]; then
+ echo "On the next boot fsck will be skipped."
+elif [ -f /forcefsck ];
+ echo "On the next boot fsck will be forced."
+fi
eval $command -i -d