In my case which is a UPS connected via a serial port. it appears to be
a timing problem - looks like upsmon is not ready when upsdrvctl is
executed in the standard init.d/nut script but am not entirely sure of
that since I have not looked at the upsdrvctl code. Anyway. as a
workaround, modified the nut script function start_stop_server "start"
case paragraph to start upsd first and upsdrvctl second with a 30 second
pause between as follows :-
start)
start-stop-daemon -S -q -p $upsd_pid -x $upsd \
-- $UPSD_OPTIONS >/dev/null 2>&1
sleep 30
! $upsdrvctl start >/dev/null 2>&1 && \
log_progress_msg "(driver(s) failed)" || log_progress_msg
"driver(s)"
;;
Then it works reliably. 15 Seconds is not enough, 30 seconds is
sufficient but may be too much - probably not the most elegant solution
but I'm happy with it. If the developer would like me to try other
solutions, I'm happy to assist.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/916956
Title:
upstart does not start cupsd and nut/upsd
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/916956/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs