-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Forgot to send this back to the list, sorry!

//Svein

- --
- --------+-------------------+-------------------------------
  /"\   |Svein Skogen       | [email protected]
  \ /   |Solberg Østli 9    | PGP Key:  0xE5E76831
   X    |2020 Skedsmokorset | [email protected]
  / \   |Norway             | PGP Key:  0xCE96CE13
        |                   | [email protected]
 ascii  |                   | PGP Key:  0x58CD33B6
 ribbon |System Admin       | [email protected]
Campaign|stillbilde.net     | PGP Key:  0x22D494A4
        +-------------------+-------------------------------
        |msn messenger:     | Mobile Phone: +47 907 03 575
        |[email protected] | RIPE handle:    SS16503-RIPE
- --------+-------------------+-------------------------------
         If you really are in a hurry, mail me at
               [email protected]
 This mailbox goes directly to my cellphone and is checked
        even when I'm not in front of my computer.
- ------------------------------------------------------------
                     Picture Gallery:
          https://gallery.stillbilde.net/v/svein/
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkp2s+8ACgkQODUnwSLUlKQOjACgqfG171n/9F1vqPncK18YsbMw
BmAAn3ZngPI7Kl7t3AZCLFOTtl48nrtr
=ro5y
-----END PGP SIGNATURE-----
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arnaud Quette wrote:
> 
> 
> 2009/7/29 Svein Skogen (listmail account) <[email protected]
> <mailto:[email protected]>>
> 
>     -----BEGIN PGP SIGNED MESSAGE-----
>     Hash: SHA1
> 
>     Arnaud Quette wrote:
>     >
>     > 2009/7/29 Svein Skogen (listmail account)
>     <[email protected] <mailto:[email protected]>
>     > <mailto:[email protected]
>     <mailto:[email protected]>>>
>     >
>     >     -----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
> 
> 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!

//Svein

- --
- --------+-------------------+-------------------------------
  /"\   |Svein Skogen       | [email protected]
  \ /   |Solberg Østli 9    | PGP Key:  0xE5E76831
   X    |2020 Skedsmokorset | [email protected]
  / \   |Norway             | PGP Key:  0xCE96CE13
        |                   | [email protected]
 ascii  |                   | PGP Key:  0x58CD33B6
 ribbon |System Admin       | [email protected]
Campaign|stillbilde.net     | PGP Key:  0x22D494A4
        +-------------------+-------------------------------
        |msn messenger:     | Mobile Phone: +47 907 03 575
        |[email protected] | RIPE handle:    SS16503-RIPE
- --------+-------------------+-------------------------------
         If you really are in a hurry, mail me at
               [email protected]
 This mailbox goes directly to my cellphone and is checked
        even when I'm not in front of my computer.
- ------------------------------------------------------------
                     Picture Gallery:
          https://gallery.stillbilde.net/v/svein/
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkp2s4AACgkQODUnwSLUlKR9KwCfWI4Un8yEPdKizAdiVB9hOhws
81QAoKCS5+S0G2qQzflafN18VXhzWu/+
=zPja
-----END PGP SIGNATURE-----


--- End Message ---
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to