[Nut-upsuser] Nut problems with Centos and Belkin UPS
rchapman at aardvark.com.au
Mon Nov 26 12:36:29 UTC 2007
Also for Tomas Smetana of the epel repository
I think we are getting somewhere - but not quite to the final goal...
If I run:
/sbin/usbhid-ups -u root -DDDDD -a BelkinUps
as suggested it all works fine - and finds the UPS on the USB port. It
still does so if I remove all the -DDDDDs.
However - if I run it without the -u root - it will not find the UPS.
When I run the provided startup script (action) - it behaves very much
the same as when I run the above command without the "-u root" option. I
am running the script as root (I think). It appears to me that maybe the
script is not running the driver as root for some reason, or maybe the
user it runs as has insufficient rights. I have had a quick look at the
script but it isn't obvious how or where it runs the driver, so I will
need to look further. Does anything obvious spring to mind as to why the
standard startup action may be starting the driver as the wrong user? As
far as I can see - the user "nut" and/or the group "nut" must have been
created by the rpm install. I didn't knowingly create them. What user
would you expect the driver to run as?
I could attach the action script - but I'm not sure it will help.
Thanks Arjen (and Tomas).
Arjen de Korte wrote:
> Richard Chapman wrote:
>> I have changed the driver in my ups.conf to usbhid-ups, and based on
>> other literature I have read - I set the port to "auto", but at startup
>> i get the error:
>> Starting UPS driver controller: Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.2.0-)
>> No matching HID UPS found
>> Driver failed to start (exit status=1)
>> I also tried setting the port to "/dev/hiddev0" and "/sys/class/usb/hiddev0"
>> based on a gnome device manager view - but these gave the same error.
>> I have checked lsusb -vv - and it still reports the device as present, though at a different "device" number.
>> The change in number seems strange since I don't believe I have moved the cable nor rebooted the system.
>> Should the "auto" port specification work OK, and if so - can you
>> suggest why it isn't being found. Alternatively - can you advise me how
>> to find and specify the correct usb port.
> Running the driver in debug mode might help us further here:
> <path>/usbhid-ups -u root -DDDDD -a <upsname>
>> You may be able to answer another question:
>> The "man belkinunv" discusses a limitation of the belkin UNV ups not
>> properly supporting soft shut-down - and also discusses a rather
>> unsatisfactory (IMHO) workaround. I imagine this limitation will apply
>> equally to the USB driver - though the workaround probably will not.
> The only way to find this is, it to try. But in order to do that, we
> first need the driver to run/
>> I don't think this issue would force me to revert to the serial driver
>> because i don't much like the strategy of completely flattening the
>> battery to achieve a pseudo soft shut-down. Can you (or others) confirm
>> that the limitation will also apply to the USB driver, and/or that the
>> workaround will not be available in the USB driver?
> There is no workaround in the driver, that's for sure. But I don't know
> if your UPS requires this.
>> Also - I am not familiar with the "version from the trunk" but I assume
>> it is some "beta" development stream. If you think I would be well
>> advised to look into this further - I would take your advise of course.
>> Any tips of how to find this would be appreciated. So far - I have only
>> worked from rpm distributions. If "the trunk" involves recompiling
>> source3s - this may be a reasonable learning curve for me...:-)
> It would require recompiling packages.
> Best regards, Arjen
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsuser