Author: baggins                      Date: Sat Jun 23 21:13:13 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- -p -t -i upsd options are deprecated and don't work, simplify sysv init script

---- Files affected:
packages/nut:
   nut.init (1.16 -> 1.17) , nut.sysconfig (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: packages/nut/nut.init
diff -u packages/nut/nut.init:1.16 packages/nut/nut.init:1.17
--- packages/nut/nut.init:1.16  Fri Jul 15 12:21:53 2011
+++ packages/nut/nut.init       Sat Jun 23 23:13:08 2012
@@ -18,22 +18,6 @@
 # Get config.
 [ -f /etc/sysconfig/ups ] && . /etc/sysconfig/ups
 
-[ -n "$PORT" ] && OPTIONS="-p $PORT"
-[ -n "$TCP_PORT" ] && OPTIONS="-t $TCP_PORT"
-[ -n "$BIND_ADDRESS" ] && OPTIONS="$OPTIONS -i $BIND_ADDRESS"
-
-if [ -n "$BIND_ADDRESS" ] || [ -n "$TCP_PORT" ]; then
-       # Check that networking is up.
-       if is_yes "${NETWORKING}"; then
-               if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != 
status ]; then
-                       msg_network_down "UPS network daemon"
-                       exit 1
-               fi
-       else
-               exit 0
-       fi
-fi
-
 RETVAL=0
 # See how we are called.
 case "$1" in
@@ -44,7 +28,7 @@
                daemon /lib/nut/upsdrvctl start
                RETVALDRV=$?
                msg_starting "UPS network daemon"
-               daemon /usr/sbin/upsd "$OPTIONS"
+               daemon /usr/sbin/upsd $UPSD_OPTIONS
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
                        touch /var/lock/subsys/ups

================================================================
Index: packages/nut/nut.sysconfig
diff -u packages/nut/nut.sysconfig:1.4 packages/nut/nut.sysconfig:1.5
--- packages/nut/nut.sysconfig:1.4      Thu Nov 28 00:41:15 2002
+++ packages/nut/nut.sysconfig  Sat Jun 23 23:13:08 2012
@@ -1,11 +1,2 @@
-# port to listen at (both TCP and UDP), defaults to 3305
-PORT=""
-
-# if TCP port is different from UDP port
-TCP_PORT=""
-
-# bind to this address only
-BIND_ADDRESS=""
-
-# poweroff UPS when halting?
-POWEROFF_UPS=no
+# Customized setings for upsd
+#UPSD_OPTIONS=""
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/nut/nut.init?r1=1.16&r2=1.17
    http://cvs.pld-linux.org/packages/nut/nut.sysconfig?r1=1.4&r2=1.5

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to