[Nut-upsuser] a slight bug of upsd?

Andrew Min Chang laplacezhang at 126.com
Tue Mar 27 15:07:54 UTC 2012


Hi, Arnaud

You're welcome.

So no matter whether upsd is running, it is safe to execute "upsd -c stop" everytime before I execute "upsd"?

--
Andrew Chang
2012-03-27


2012-03-24 03:17:23,"Arnaud Quette" <aquette.dev at gmail.com> :


2012/3/22 Andrew Min Chang <laplacezhang at 126.com>

 Hi!


Hi Andrew
 
I found that if upsd had been running, then another "upsd" was typed. The upsd.pid file would be deleted and the previous upsd could not quit normally unless using "pkill upsd".

The second upsd detects port conflict, and then deletes the upsd.pid. As a result, any further "upsd -c stop" or "upsd -c reload" would detect no upsd.pid and simply quit.

I know this operation sequence is not legal and this may not be treated as a bug. However is it better to may be better to take a examination after ran as "upsd"? Or upsd is just designed to be like that?

If it is designed to be like that, should I execute a "upsd -c stop" every time before "upsd"?


this is a long standing issue, for which I've a patch stagging for... a long time.
for the sake of completion, note that the same is true for upsmon too, but not for drivers.

I've just completed and committed this to the trunk (r3506):
http://trac.networkupstools.org/projects/nut/changeset/3506

thanks for popping it up.

cheers,
Arnaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20120327/a1082a4e/attachment.html>


More information about the Nut-upsuser mailing list