diff options
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/halt')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/halt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/halt b/meta/recipes-core/initscripts/initscripts-1.0/halt new file mode 100755 index 0000000000..609b793b7c --- /dev/null +++ b/meta/recipes-core/initscripts/initscripts-1.0/halt | |||
@@ -0,0 +1,29 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: halt | ||
4 | # Required-Start: | ||
5 | # Required-Stop: | ||
6 | # Default-Start: | ||
7 | # Default-Stop: 0 | ||
8 | # Short-Description: Execute the halt command. | ||
9 | # Description: | ||
10 | ### END INIT INFO | ||
11 | |||
12 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
13 | |||
14 | # See if we need to cut the power. | ||
15 | if test -x /etc/init.d/ups-monitor | ||
16 | then | ||
17 | /etc/init.d/ups-monitor poweroff | ||
18 | fi | ||
19 | |||
20 | # Don't shut down drives if we're using RAID. | ||
21 | hddown="-h" | ||
22 | if grep -qs '^md.*active' /proc/mdstat | ||
23 | then | ||
24 | hddown="" | ||
25 | fi | ||
26 | |||
27 | halt -d -f -i -p $hddown | ||
28 | |||
29 | : exit 0 | ||