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