summaryrefslogtreecommitdiffstats
path: root/meta/packages/initscripts/initscripts-1.0/halt
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/halt')
-rwxr-xr-xmeta/packages/initscripts/initscripts-1.0/halt31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/halt b/meta/packages/initscripts/initscripts-1.0/halt
new file mode 100755
index 0000000000..aa1769606a
--- /dev/null
+++ b/meta/packages/initscripts/initscripts-1.0/halt
@@ -0,0 +1,31 @@
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
8PATH=/sbin:/bin:/usr/sbin:/usr/bin
9
10# Update the timestamp, if there is already one
11if test -e /etc/timestamp
12then
13 date +%2m%2d%2H%2M%Y > /etc/timestamp
14fi
15
16# See if we need to cut the power.
17if test -x /etc/init.d/ups-monitor
18then
19 /etc/init.d/ups-monitor poweroff
20fi
21
22# Don't shut down drives if we're using RAID.
23hddown="-h"
24if grep -qs '^md.*active' /proc/mdstat
25then
26 hddown=""
27fi
28
29halt -d -f -i -p $hddown
30
31: exit 0