summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Rękorajski2012-06-23 21:13:08 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit18d5299435ca78b22a1092e0fc265c213939e7ad (patch)
treec2ded17d492f2b122e601c83731f9a9a84374db6
parente3c467c6032d33321dd6affbad5a554877b153d1 (diff)
downloadnut-18d5299435ca78b22a1092e0fc265c213939e7ad.zip
nut-18d5299435ca78b22a1092e0fc265c213939e7ad.tar.gz
- -p -t -i upsd options are deprecated and don't work, simplify sysv init script
Changed files: nut.init -> 1.17 nut.sysconfig -> 1.5
-rw-r--r--nut.init18
-rw-r--r--nut.sysconfig13
2 files changed, 3 insertions, 28 deletions
diff --git a/nut.init b/nut.init
index 6856559..ccacb32 100644
--- a/nut.init
+++ b/nut.init
@@ -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 @@ case "$1" in
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
diff --git a/nut.sysconfig b/nut.sysconfig
index dc58734..7489680 100644
--- a/nut.sysconfig
+++ b/nut.sysconfig
@@ -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=""