[Nut-upsuser] Generic UPS driver

Charles Lepple clepple at gmail.com
Fri Jan 17 04:13:25 UTC 2014


On Jan 16, 2014, at 4:51 PM, Ariel Wainer wrote:

> One small comment:
> When the driver has no permission to access the device, it exits with a
> segmentation fault, it would be nice to have a more informative error.
> I'm not really sure if the issue is speciffic to this driver or is it
> general.


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 :-)

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.

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list