summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/community/network-ups-tools/run.upsd
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verison.net>2010-03-25 17:42:02 (GMT)
committerMichael Hanson <hansonorders@verison.net>2010-03-25 17:42:02 (GMT)
commit10b4773ed5a39f59be3b9d9de0ddd7a53381df99 (patch)
tree35b791b36bed16947225eba4a1a313777053acda /abs/extra-testing/community/network-ups-tools/run.upsd
parent517e1b135728c7e5674335e3ae1d9539044cd53a (diff)
downloadlinhes_pkgbuild-10b4773ed5a39f59be3b9d9de0ddd7a53381df99.zip
linhes_pkgbuild-10b4773ed5a39f59be3b9d9de0ddd7a53381df99.tar.gz
linhes_pkgbuild-10b4773ed5a39f59be3b9d9de0ddd7a53381df99.tar.bz2
network-ups-tools: Revert recent changes because they did not work as expected
re-instated looper in the run file
Diffstat (limited to 'abs/extra-testing/community/network-ups-tools/run.upsd')
-rw-r--r--abs/extra-testing/community/network-ups-tools/run.upsd16
1 files changed, 14 insertions, 2 deletions
diff --git a/abs/extra-testing/community/network-ups-tools/run.upsd b/abs/extra-testing/community/network-ups-tools/run.upsd
index b0a02a3..83be88d 100644
--- a/abs/extra-testing/community/network-ups-tools/run.upsd
+++ b/abs/extra-testing/community/network-ups-tools/run.upsd
@@ -3,7 +3,19 @@
. /etc/rc.conf
. /etc/rc.d/functions
-svwaitup 3 /var/service/upsdrvctl || exit 1
+PID=`pidof -o %PPID /usr/sbin/upsd`
stat_runit "Starting UPSd Daemon"
- exec /usr/bin/upsd -D &> /dev/null
+ /usr/bin/upsdrvctl start &> /dev/null
+ [ -z "$PID" ] && /usr/sbin/upsd &>/dev/null
+ /usr/sbin/upsmon &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon upsd
+ stat_done
+ fi
+
+ while [ -n $PID ] ; do
+ sleep 60
+ done