[Nut-upsuser] Spurious messages on start

Pedro Côrte-Real pedro at pedrocr.net
Mon Nov 13 15:39:59 CET 2006


On 11/13/06, Peter Selinger <selinger at mathstat.dal.ca> wrote:
> To answer that question, we would have to see the script.  This is not
> the Ubuntu/Debian mailing list, so what's standard to them may not be
> standard to us.

I think the person that packages nut for debian is on the list and I
assumed this was maintained along with mainstream nut. Here's the
relevant parts anyway. When starting three commands are ran:

! /sbin/upsdrvctl start >/dev/null 2>&1  && echo -n " (upsdrvctl failed)"
start-stop-daemon -S -q -p $upsd_pid -x $upsd >/dev/null 2>&1
start-stop-daemon -S -q -p $upsmon_pid -x $upsmon >/dev/null 2>&1

upsdrvctl seems to be working as I've tried redirecting its output to
a temp file instead of /dev/null and it said:

"""
Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4)

Detected a UPS: MGE UPS SYSTEMS/ellipse
Using subdriver: MGE HID 0.9
Network UPS Tools - UPS driver controller 2.0.4
"""

Adding a 20 second sleep between starting upsd and starting upsmon
seems to solve the problem so I guess this happens because upsmon is
started right away when upsd hasn't started communicating with the UPS
but is already accepting connections.

I added a 30 second sleep to my init file just to be on the safe side.
Seems to work fine now but it seems like a bug in the way upsd and
upsmon interact on startup.

Pedro.



More information about the Nut-upsuser mailing list