aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrc.d/init.d/halt8
-rwxr-xr-xrc.d/rc.sysinit2
2 files changed, 8 insertions, 2 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
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 43b08b80..e7cf8a04 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -452,7 +452,7 @@ if [ -x /sbin/quotaon ]; then
fi
# Clean out /etc.
-rm -f /fastboot /fsckoptions /forcefsck
+rm -f /fastboot /fsckoptions /forcefsck /halt /poweroff
# Do we need (w|u)tmpx files? We don't set them up, but the sysadmin might...
_NEED_XFILES=