Attributes in RUN part of udev rules

Asked by Id2ndR

I've got the following files :
/etc/udev/rules.d/80-usb_modeswitch.rules :
SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="2000", RUN+="/usr/sbin/usb_modeswitch.sh '%b/%k/%s{idVendor}/%s{idProduct}/%s{manufacturer}/%s{product}/%s{serial}'"

/usr/sbin/usb_modeswitch.sh :
echo "/usr/sbin/usb_modeswitch.tcl $1" > /tmp/usb_modeswitch.log

When I insert my GSM usb dongle and read /tmp/usb_modeswitch.log it appears that :
- %k is replace by something non empty (1-1:1.0 in my case)
- %b and all attributes are replace by a empty string.

I've checked that the attributes exist with the following command and there are here :
$ udevadm info -a -p /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1

So my question is simple : why attributes aren't replaced in the run command ?

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu udev Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

Provide an answer of your own, or ask Id2ndR for more information if necessary.

To post a message you must log in.