[Nut-upsuser] Generic UPS driver

Ariel Wainer ari at ariwainer.com.ar
Fri Jan 17 23:31:53 UTC 2014


On 17/01/14 01:13, Charles Lepple wrote:
>
> Good point. I forgot that the permissions errors would happen after the numeric device IDs were matched.
>
> I just pushed 3c13603. Tested by telling the driver to match a random USB device instead of 0001:0000, and sure enough, when the driver didn't have write access, the unpatched code crashed. Not sure I want to try and send UPS polling commands to either a working UPS, or the mouse or keyboard, so I'll leave the rest of the testing to you :-)

I see that the commit belongs to the master branch :)
It correctly informs there's a permission error now.

> scripts/udev/nut-usbups.rules should have an entry for 0001:0000 (although the comments mention a different driver). You may have to refresh udev somehow to get it to fix the permissions on the UPS, although we have had reports that the rules file silently fails on non-Debian-derived systems.
>

The rule in my config was:

ATTR{idVendor}=="0001", ATTR{idProduct}=="0000", MODE="664", GROUP="nobody"

I have to add OWNER=nobody or change the mode to make it work, upsd is
running under the user nobody, but I see all the rules looks the same,
probably I'm doing something wrong.



More information about the Nut-upsuser mailing list