aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/halt8
1 files changed, 3 insertions, 5 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 82ffe34e..ac25bb6f 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -190,11 +190,6 @@ elif [ -f /forcefsck ]; then
echo $"On the next boot fsck will be forced."
fi
-HALTARGS="-i -d"
-if [ -f /poweroff -o ! -f /halt ]; then
- HALTARGS="$HALTARGS -p"
-fi
-
if [ "$command" = /sbin/halt -a -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then
. /etc/sysconfig/ups
[ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] && $MODEL -k $DEVICE
@@ -204,4 +199,7 @@ if [ -x /sbin/halt.local ]; then
/sbin/halt.local
fi
+HALTARGS="-i -d"
+[ -f /poweroff -o ! -f /halt ] && HALTARGS="$HALTARGS -p"
+
exec $command $HALTARGS