e31ef6660f1b690c7c8ab8d2077afe7b9793622f
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-core / initscripts / initscripts-1.0 / vuplus / halt
1 #! /bin/sh
2 #
3 # halt          Execute the halt command.
4 #
5 # Version:      @(#)halt  2.84-2  07-Jan-2002  miquels@cistron.nl
6 #
7
8 PATH=/sbin:/bin:/usr/sbin:/usr/bin
9
10 # See if we need to cut the power.
11 if test -x /etc/init.d/ups-monitor
12 then
13         /etc/init.d/ups-monitor poweroff
14 fi
15
16 # Don't shut down drives if we're using RAID.
17 hddown="-h"
18 if grep -qs '^md.*active' /proc/mdstat
19 then
20         hddown=""
21 fi
22
23 showiframe /usr/share/switchoff.mvi
24
25 /usr/bin/turnoff_power
26
27 halt -d -f -i -p $hddown
28
29 : exit 0