[Nut-upsuser] NUT + devd + FreeBSD

Charles Lepple clepple at gmail.com
Fri Jul 18 13:11:56 UTC 2014


On Mon, Oct 29, 2007 at 9:45 PM, Daniel O'Connor <doconnor at gsoft.com.au> wrote:
> I made the following devd script..
>
> sh
> cd /tmp
> fetch
> mkdir /usr/local/etc/devd
> sed -Ene 's/SYSFS\{idVendor\}==\"(.*)\", SYSFS\{idProduct\}==\"(.*)\", MODE=.*/attach 100 {\
>         device-name "ugen[0-9]+";\
>         match "vendor"  "0x\1";\
>         match "product" "0x\2";\
>         action "chown @RUN_AS_GROUP@ \/dev\/$device-name*; chmod 660 \/dev\/$device-name*";\
> };\
> /p' </usr/ports/sysutils/nut/work/nut-2.2.0/scripts/udev/nut-usbups.rules.in | sed -e 's#@RUN_AS_GROUP@#uucp#g' > /usr/local/etc/devd/nut.conf
> /etc/rc.d/devd restart

Hi Daniel,

Dusting off this thread, since the FreeBSD ports tree picked up NUT
2.7.2 and now includes an auto-generated nut-usb.conf devd file.

However, I also noticed this PR filed against the port:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191777

Somewhere along the line, I must have changed things from "attach" to
"notify", and dropped the device-name match. However, their solution
to that bug was to remove the star after the device name. What was the
rationale for the wildcard? Does this handle the bus scanning
permissions?

Thanks,

-- 
- Charles Lepple



More information about the Nut-upsuser mailing list