1
--- /etc/rc.d/init.d/halt Thu Mar 28 00:21:19 2002
2
+++ halt.new Fri Jan 31 15:29:49 2003
4
# Modified for RHS Linux by Damien Neil
7
+# 2003-01-31 Antonino Albanese <al.an@monkeysweb.net>
8
+# Modified ups shutdown for new NUT method
11
PATH=/sbin:/bin:/usr/bin:/usr/sbin
12
+# load /etc/sysconfig/ups if present I've put the POWERDOWNFLAG
13
+# in there so noboby have to manually modify the shutdown script
14
+if [ -f /etc/sysconfig/ups ]; then
15
+ . /etc/sysconfig/ups
17
+UPSCMD=`which upsdrvctl`
20
. /etc/init.d/functions
24
if [ "$command" = halt ] ; then
25
- if [ -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then
26
- . /etc/sysconfig/ups
27
- [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] && $MODEL -k $DEVICE
29
+# if [ -r /etc/ups/upsmon.conf -a -f /etc/killpower -a -f /etc/sysconfig/ups ] ; then
30
+# . /etc/sysconfig/ups
31
+# [ "$SERVER" = "yes" -a "$MODEL" != "NONE" -a -n "$MODEL" -a -n "$DEVICE" ] && $MODEL -k $DEVICE
33
+ if [ -n "$POWERDOWNFLAG" -a -n "$UPSCMD" ]; then
34
+ if [ -f $POWERDOWNFLAG ]; then
40
if [ -x "/sbin/halt.local" ]; then