aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-04-19 19:57:45 +0000
committerBill Nottingham <notting@redhat.com>2000-04-19 19:57:45 +0000
commit4121d98cec8bd1260b4d7608f82797f63beb0f36 (patch)
tree6f4f642324dc1ab78e48f8d6c9f9330cbdc0f89b /rc.d/init.d
parent52642683037ae0760efd18fe2e3446df7c552dae (diff)
downloadinitscripts-4121d98cec8bd1260b4d7608f82797f63beb0f36.tar
initscripts-4121d98cec8bd1260b4d7608f82797f63beb0f36.tar.gz
initscripts-4121d98cec8bd1260b4d7608f82797f63beb0f36.tar.bz2
initscripts-4121d98cec8bd1260b4d7608f82797f63beb0f36.tar.xz
initscripts-4121d98cec8bd1260b4d7608f82797f63beb0f36.zip
use /poweroff and /halt to determine whether powering off
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/halt8
1 files changed, 7 insertions, 1 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 857db62d..36263c7c 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -116,4 +116,10 @@ if [ -f /fastboot ]; then
elif [ -f /forcefsck ]; then
echo "On the next boot fsck will be forced."
fi
-eval $command -i -d -p
+
+HALTARGS="-i -d"
+if [ -f /poweroff -o ! -f /halt]; then
+ HALTARGS="$HALTARGS -p"
+fi
+
+eval $command $HALTARGS