summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/halt
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/initscripts/initscripts-1.0/halt
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/halt')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/halt29
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..a56f73421b
--- /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
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14# See if we need to cut the power.
15if test -x /etc/init.d/ups-monitor
16then
17 /etc/init.d/ups-monitor poweroff
18fi
19
20# Don't shut down drives if we're using RAID.
21hddown="-h"
22if grep -qs '^md.*active' /proc/mdstat
23then
24 hddown=""
25fi
26
27halt SED_HALTARGS -p $hddown
28
29: exit 0