Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296476 - sys-power/apcupsd-3.14.7: improve apcupsd.conf and provide 50-udev.rules
Summary: sys-power/apcupsd-3.14.7: improve apcupsd.conf and provide 50-udev.rules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-11 00:18 UTC by Martin Mokrejš
Modified: 2011-05-18 09:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2009-12-11 00:18:11 UTC
I had to edit the following files when I wanted to receive emails on other address that 'root' on the particular machine. I belive this variable could be included in apcupsd.conf and sources from these shell scripts:

/etc/apcupsd/changeme /etc/apcupsd/commfailure /etc/apcupsd/commok /etc/apcupsd/offbattery /etc/apcupsd/onbattery

Alternatively it would be fine to add einfo() message pointing to these files, although necessity to edit all of the is awkward.

BTW, I did not test that but this multiple email addresses can be specified as "me@foor other@bar".

Finally, to get my ups detected through the USB cable I had to create this file:
# cat /etc/udev/rules.d/50-udev.rules
KERNEL=="hiddev*", NAME="usb/%k", MODE="0660", GROUP="wheel"
#

and enable HIDdev and HIDraw in my kernel. Helpful was some gentoo wikipage. At the moment have enabled under 2.6.32 kernel all of these although maybe not all are needed:

CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y # I think this was necessary
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y # and this one as well
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-11 11:57:10 UTC
I'm afraid here we're going to have to separate the issues:

 - the configuration issue should be brought up with upstream I don't desire to diverge with them on that;
 - the udev rules shouldn't be necessary given that apcupsd starts up as root;
 - I'll see to add checks for HIDDEV/HIDRAW asap though.
Comment 2 Martin Mokrejš 2009-12-12 01:10:56 UTC
> - the udev rules shouldn't be necessary given that apcupsd starts up as root;

That was mentioned at http://en.gentoo-wiki.com/wiki/Apcupsd , i did not understand what "mk" had to run do create the missing udev file. As I posted I just created it with that one line.


> - I'll see to add checks for HIDDEV/HIDRAW asap though.

One of these was definitely necessary to get it finding the USB device if no both.


Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-03-14 20:37:14 UTC
Finally implemented the checks.
Comment 4 Pouya K 2011-05-14 14:03:05 UTC
It works for me without HIDRAW. Can anyone verify that it is actually necessary?
Comment 5 Martin Mokrejš 2011-05-18 09:18:51 UTC
(In reply to comment #4)
> It works for me without HIDRAW. Can anyone verify that it is actually
> necessary?

OK, so I removed the HIDRAW from my kernel altogether and apcupsd still works and can talk to the UPS. So, I am clarifying my original report and confirm that no HIDRAW is needed. Thanks.