Introduces a variable HALTARGS which specifies the arguments sent to halt and reboot, and sets the default value to "-d -f", dropping the previous -i (shut down all network interfaces before halt/reboot, which causes a freeze with NFS root.) Fixes [YOCTO #997]. (From OE-Core rev: ace183894a5319cd73c94fd2653bbe52f29dca0b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
30 lines
518 B
Bash
Executable file
30 lines
518 B
Bash
Executable file
#! /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
|