<br><br><div class="gmail_quote">2009/8/3 Svein Skogen (listmail account) <span dir="ltr"><<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Arnaud Quette wrote:<br>
><br>
><br>
> 2009/7/29 Svein Skogen (listmail account) <<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a><br>
> <mailto:<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a>>><br>
><br>
> -----BEGIN PGP SIGNED MESSAGE-----<br>
> Hash: SHA1<br>
><br>
> Arnaud Quette wrote:<br>
> ><br>
> > 2009/7/29 Svein Skogen (listmail account)<br>
> <<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a> <mailto:<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a>><br>
> > <mailto:<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a><br>
> <mailto:<a href="mailto:svein-listmail@stillbilde.net">svein-listmail@stillbilde.net</a>>>><br>
> ><br>
> > -----BEGIN PGP SIGNED MESSAGE-----<br>
> > Hash: SHA1<br>
> ><br>
> > Charles Lepple wrote:<br>
> > > On Jul 29, 2009, at 5:26 AM, Svein Skogen (listmail account)<br>
> wrote:<br>
> > ><br>
> > >> On a sidenote, I had a really hard time getting the<br>
> usbhid-ups driver<br>
> > >> working in FreeBSD running as a non-privileged user (even with<br>
> > >> permissions on the /dev/ file set properly). Running it as root<br>
> > works,<br>
> > >> though, so no biggie (I have the luxury of having the ups<br>
> > connected to a<br>
> > >> dedicated box that is sufficiently fenced off from the rest<br>
> of the<br>
> > >> network).<br>
> > ><br>
> > > I don't have my FreeBSD box handy, but I seem to remember having<br>
> > to set<br>
> > > permissions on both the bus (for libusb to enumerate the<br>
> devices)<br>
> > and on<br>
> > > the device's /dev node itself.<br>
> ><br>
> > That I didn't try. I'll try it later (right now the weather<br>
> here is too<br>
> > unstable for me to consider messing with the UPS setup just<br>
> when I might<br>
> > need it). Thanks for the tip. (If this works, maybe it should<br>
> be added<br>
> > to some documentation?)<br>
> ><br>
> ><br>
> > sure, and even more knowing that we're working on the new shiny doc.<br>
> > I'm also keen in automating the process, if possible, as for udev<br>
> on Linux.<br>
> ><br>
> > any hints / feedback is welcome since I'm not a *BSD user (simply<br>
> due to<br>
> > a lack of time, not of interest!)<br>
><br>
> If we can get the permissions bit sorted out,<br>
><br>
><br>
> indeed, and that's what I want to automate, as for linux.<br>
> the point 4 of Thierry's doc illustrate this<br>
> <a href="http://people.freebsd.org/%7Ethierry/nut_FreeBSD_HowTo.txt" target="_blank">http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt</a><br>
><br>
> It seems that devfsd is as dynamic as udev, tied to a specific physical<br>
> dev and only for coldplugging (applied at boot time only).<br>
><br>
> in the vain of the other autogenerated USB helpers, I can make another<br>
> one for FreeBSD to is executed at will (at config time, or by the init<br>
> script<br>
><br>
> Thierry, do you have more info on the current devfsd situation.<br>
> Would you be willing to work with me on simplifying the situation with<br>
> the creation of an helper script (a kind of nut-find-usbups)?<br>
><br>
> all the hints are "cd<br>
> /usr/ports/sysutils/nut && make clean config build install clean" then<br>
> read docs and set up .conf-files in /usr/local/etc/nut. FreeBSD is<br>
> fairly relaxing in that way. ;)<br>
><br>
><br>
> thanks for the above info.<br>
<br>
</div></div>I can confirm that allowing the default nut non-privileged user (on<br>
freebsd "uucp") access on the usb bus itself solves the problem.<br>
<br>
My /etc/devfs.rules is now as follows:<br>
<br>
[nut_usb=10]<br>
add path 'usb1' group wheel user uucp mode 0660<br>
add path 'ugen0' group wheel user uucp mode 0660<br>
<br>
where "usb1" is the /dev/usb1 bus that the ups is connected to, and<br>
"ugen0" is the cyberpower ups itself.<br>
<br>
/etc/rc.conf has the line<br>
devfs_system_ruleset="nut_usb"<br>
<br>
to actually enable it.<br>
<br>
Thanks for pointing in the correct direction!<br>
</blockquote></div><br>uhm, not that easy to automate since the device number will depend on the enumeration order (and so on the presence of other devices on the same bus).<br clear="all"><br>I'll first document the FreeBSD steps, while waiting for an helper:<br>
<a href="https://alioth.debian.org/tracker/index.php?func=detail&aid=311864&group_id=30602&atid=411545">https://alioth.debian.org/tracker/index.php?func=detail&aid=311864&group_id=30602&atid=411545</a><br>
<br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br><br>