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