aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorThan Ngo <than@redhat.com>2001-04-23 22:55:05 +0000
committerThan Ngo <than@redhat.com>2001-04-23 22:55:05 +0000
commit6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d (patch)
tree85776296e089fe8f0234e49873404086a38ecd5b /rc.d
parentbdcc326fd3a288edff95c5e0928d3a812c0a096f (diff)
downloadinitscripts-6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d.tar
initscripts-6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d.tar.gz
initscripts-6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d.tar.bz2
initscripts-6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d.tar.xz
initscripts-6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d.zip
add shutdown UPS into haltr5-83
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