From 6b9dbd8f779ccfc8f92ff6af893f6c55d8e6f81d Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 23 Apr 2001 22:55:05 +0000 Subject: add shutdown UPS into halt --- rc.d/init.d/halt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rc.d/init.d') 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 -- cgit v1.2.1