aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
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