[Nut-upsuser] UPS/NUT with openSUSE 13.1

Charles Lepple clepple at gmail.com
Wed Sep 16 01:31:32 UTC 2015


On Sep 15, 2015, at 5:12 PM, Rob Groner <rgroner at RTD.com> wrote:
> 
> Charles,
>  
> Trying to track down the source of the problem, I checked Yast to make sure I had at least 0.1.8 version for libusb.  I saw this (attached photo).  Is it then actually using –compat instead of the “real” libusb?  And is that a problem?

You're right, both the -compat and real libusb packages will use the same libusb-0.1.so* name.

It's not necessarily a problem, but it does mean that there is different code between your driver and the kernel. Most of the NUT testing has been done with the original libusb.

> I just thought of something else that has changed since the last time I was trying this....  I am now using the "--with-pidpath=/var/run/ups" configuration parameter to change where everything keeps the pid files.  I wasn't doing that before.  Since that's mounted to tmpfs, is it possible that's getting unmounted before the shutdown command happens (and thus not finding the .pid file, it tries to start it instead)?

You might be on to something, but if so, the race happens earlier than the "usbhid-ups -k" invocation. Because the "-k" flag is meant to be called at the end of the shutdown sequence, it doesn't assume /var is mounted, and consequently, it doesn't check for other PID files. However, if a driver happens to still be running, it could cause the "-k" option to report a busy error.

https://github.com/networkupstools/nut/blob/master/drivers/main.c#L588

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list