aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/halt7
1 files changed, 7 insertions, 0 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 566b8a60..ba102da5 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -184,4 +184,11 @@ if [ -f /poweroff -o ! -f /halt ]; then
HALTARGS="$HALTARGS -p"
fi
+if [ "$command" = halt ] ; then
+ if [ -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
+ fi
+fi
+
eval $command $HALTARGS