2 # Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany. All rights reserved.
4 # Author: Florian La Roche <florian@suse.de>, 1996
5 # Werner Fink <werner@suse.de>, 1996
7 # Updated for "apcupsd"
8 # Andre M. Hedrick <hedrick@astro.dyer.vanderbilt.edu>, 1997
10 # /sbin/init.d/halt (and symlinked to reboot)
17 message
="The system is halted."
21 message
="Please stand by while rebooting the system..."
25 echo "$0: call me as \"halt\" or \"reboot\" please!"
30 # Write to wtmp file before unmounting /var
33 echo "Sending all processes the TERM signal..."
36 if [ "$1" = "fast" ]; then
42 echo "Sending all processes the KILL signal..."
45 echo "Turning off swap."
49 echo "Unmounting file systems"
52 # maybe we use Multiple devices
53 if test -f /etc
/mdtab
-a -x /sbin
/mdadd
; then
54 echo -n "Disable Multiple Devices"
59 # See if this is a powerfail situation.
60 if [ -f @PWRFAILDIR@
/powerfail
]; then
62 echo "Apcupsd will now power off the UPS!"
64 @sysconfdir@
/apccontrol killpower
68 # on umsdos fs this would lead to an error message. so direct errors to
70 mount
-no remount
,ro
/ 2> /dev
/null