Solved devd config file not working under FreeBSD 13.2-release, has something changed?

I have this devd config file:
Code:
root@kg-core1:~ # cat /usr/local/etc/devd/hifive1.conf
# allow group (operator) to access the usb connection of hifive1

notify 100 {
        match "system"          "USB";
        match "subsystem"       "INTERFACE";
        match "type"            "ATTACH";
        match "vendor" "0x0403";
        match "product" "0x6010";
        action "usb_devaddr=`echo $cdev | sed 's#^ugen##'` && chmod g+rw /dev/usb/${usb_devaddr}.*";
};
and I have restarted devd via service devd restart and unplugged and re-plugged the device. But permissions on the device doesn't change
Code:
root@kg-core1:~ # usbconfig -d ugen3.5 dump_device_desc
ugen3.5: <FTDI Dual RS232-HS> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0403 
  idProduct = 0x6010 
  bcdDevice = 0x0700 
  iManufacturer = 0x0001  <FTDI>
  iProduct = 0x0002  <Dual RS232-HS>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 

root@kg-core1:~ # ls -l /dev/ugen3.5 /dev/usb/3.5*
lrwxr-xr-x  1 root  wheel         9 May 16 22:42 /dev/ugen3.5 -> usb/3.5.0
crw-------  1 root  operator  0x1b8 May 16 22:42 /dev/usb/3.5.0
crw-------  1 root  operator  0x1be May 16 22:42 /dev/usb/3.5.1
crw-------  1 root  operator  0x1bf May 16 22:42 /dev/usb/3.5.2
crw-------  1 root  operator  0x1c0 May 16 22:42 /dev/usb/3.5.3
crw-------  1 root  operator  0x1c1 May 16 22:42 /dev/usb/3.5.4
this is on a machine running FreeBSD 13.2-release
Code:
root@kg-core1:~ # freebsd-version -ku
13.2-RELEASE
13.2-RELEASE
root@kg-core1:~ # uname -a
FreeBSD kg-core1.kg4.no 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64
if I plug the device into a machine which uses FreeBSD 13.1-release-p7 it works
Code:
root@kg-core2:~ # freebsd-version -ku
13.1-RELEASE-p6
13.1-RELEASE-p7
root@kg-core2:~ # uname -a
FreeBSD kg-core2.kg4.no 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd64

root@kg-core2:~ # ls -l /dev/ugen1.6 /dev/usb/1.6*
lrwxr-xr-x  1 root  wheel         9 May 16 22:58 /dev/ugen1.6 -> usb/1.6.0
crw-rw----  1 root  operator  0x18d May 16 22:58 /dev/usb/1.6.0
crw-rw----  1 root  operator  0x1de May 16 22:58 /dev/usb/1.6.1
crw-rw----  1 root  operator  0x1df May 16 22:58 /dev/usb/1.6.2
crw-rw----  1 root  operator  0x1e8 May 16 22:58 /dev/usb/1.6.3
crw-rw----  1 root  operator  0x1e9 May 16 22:58 /dev/usb/1.6.4
has anything changed with devd in 13.2-release? I tried searching, but couldn't find anything.
 
Try using logger(1) (there are several uses of it in devd.conf already) to check that event is recognized and all values are what you expect it to be.

P.S. I was going to suggest also looking at devfs.rules(5), but I see the reason for a bit more "dynamic" rule here.
 
It seems this was caused by formatting; a couple of lines in the file had a single space as field delimiter, most of the lines had multiple spaces. after fixing that it works
Code:
root@kg-core1:~ # cat /usr/local/etc/devd/hifive1.conf
# allow group (operator) to access the usb connection of hifive1

notify 100 {
        match "system"          "USB";
        match "subsystem"       "INTERFACE";
        match "type"            "ATTACH";
        match "vendor"        "0x0403";
        match "product"        "0x6010";
        action "usb_devaddr=`echo $cdev | sed 's#^ugen##'` && chmod g+rw /dev/usb/${usb_devaddr}.*";
};
Odd that it worked in FreeBSD 13.1-release-p7. But hey - it works now.
FWIW, both multiples spaces and tab seems to work.
 
Back
Top