From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/recipes-core/initscripts/initscripts-1.0/halt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 meta/recipes-core/initscripts/initscripts-1.0/halt (limited to 'meta/recipes-core/initscripts/initscripts-1.0/halt') 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 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: halt +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 +# Short-Description: Execute the halt command. +# Description: +### END INIT INFO + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# See if we need to cut the power. +if test -x /etc/init.d/ups-monitor +then + /etc/init.d/ups-monitor poweroff +fi + +# Don't shut down drives if we're using RAID. +hddown="-h" +if grep -qs '^md.*active' /proc/mdstat +then + hddown="" +fi + +halt SED_HALTARGS -p $hddown + +: exit 0 -- cgit v1.2.3-54-g00ecf