3 # halt Execute the halt command.
5 # Version: @(#)halt 2.84-2 07-Jan-2002 miquels@cistron.nl
8 PATH=/sbin:/bin:/usr/sbin:/usr/bin
10 # Update the timestamp, if there is already one
11 if test -e /etc/timestamp
13 date +%2m%2d%2H%2M%Y > /etc/timestamp
16 # See if we need to cut the power.
17 if test -x /etc/init.d/ups-monitor
19 /etc/init.d/ups-monitor poweroff
22 # Don't shut down drives if we're using RAID.
24 if grep -qs '^md.*active' /proc/mdstat
29 halt -d -f -i -p $hddown