aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-08-29 17:22:03 +0000
committerBill Nottingham <notting@redhat.com>2007-08-29 17:22:03 +0000
commitfbfc09e16e981513e9e4ed8cce4513798f0b1b2c (patch)
tree34046ccfa706eae773a2abc89477bf9cdb000fa6 /rc.d/init.d
parentf0258d6553a3037824f538c997f964987c10c337 (diff)
downloadinitscripts-fbfc09e16e981513e9e4ed8cce4513798f0b1b2c.tar
initscripts-fbfc09e16e981513e9e4ed8cce4513798f0b1b2c.tar.gz
initscripts-fbfc09e16e981513e9e4ed8cce4513798f0b1b2c.tar.bz2
initscripts-fbfc09e16e981513e9e4ed8cce4513798f0b1b2c.tar.xz
initscripts-fbfc09e16e981513e9e4ed8cce4513798f0b1b2c.zip
adapt to new nut usage, conflict with older packages (#252973)
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/halt10
1 files changed, 6 insertions, 4 deletions
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