From fbfc09e16e981513e9e4ed8cce4513798f0b1b2c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 29 Aug 2007 17:22:03 +0000 Subject: adapt to new nut usage, conflict with older packages (#252973) --- rc.d/init.d/halt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rc.d/init.d/halt') diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 74bcb635..a6d719ef 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -204,12 +204,14 @@ elif [ -f /forcefsck ]; then echo $"On the next boot fsck will be forced." fi -if [ "$command" = /sbin/halt -a -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then +# Shutdown UPS drivers +if [ "$command" = /sbin/halt -a -f /etc/sysconfig/ups ]; then . /etc/sysconfig/ups - if [ "$SERVER" = "yes" -a "$MODEL" = "upsdrvctl" ] ; then + if [ -z $POWERDOWNFLAG ]; then + POWERDOWNFLAG=/etc/killpower + fi + if [ "$SERVER" = "yes" -a -f $POWERDOWNFLAG ]; then /sbin/upsdrvctl shutdown - elif [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] ; then - $MODEL $OPTIONS_HALT -k $DEVICE fi fi -- cgit v1.2.1