2
votes

On detection of a USB device I'm trying to have udev start up a process and pass the serial number of the USB device as an argument to the process.

file:/etc/udev/rules.d/10-FTDI2232H-usb.rules

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", RUN+="/opt/usbprog %s" ATTR{serial}

I'm not to sure if the printf style arguments is how this supposed to be accomplished. Any help would be greatly appreciated.

1

1 Answers

2
votes

Ah...I finally figured it out.

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", RUN+="/opt/usbprog %s{serial}", $ATTR{serial}