produces lots of output. Focusing on the section below (I believe you cannot mix attributes from different sections?) I have tried to narrow the udev rule.
Using the rule:
- Code: Select all
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="8564", ATTRS{serial}=="71519F31", RUN:="/root/scripts/mount_USBStick1.sh &"
What can I do to get it down to just one?
- Code: Select all
# udevadm info --attribute-walk --name /dev/sdc1 | less
...
looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-6':
KERNELS=="2-6"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="6"
ATTRS{idVendor}=="8564"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="2"
ATTRS{devnum}=="34"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="200mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0112"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="71519F31"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="814"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="JetFlash"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="1000"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="Mass Storage Device"
Here is the output of udevadm monitor --subsystem-match="usb":
- Code: Select all
# udevadm monitor --subsystem-match="usb"
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[386993.075219] remove /devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.0 (usb)
KERNEL[386993.075357] remove /devices/pci0000:00/0000:00:1d.7/usb2/2-6 (usb)
UDEV [386993.108098] remove /devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.0 (usb)
UDEV [386993.110601] remove /devices/pci0000:00/0000:00:1d.7/usb2/2-6 (usb)
KERNEL[386996.678941] add /devices/pci0000:00/0000:00:1d.7/usb2/2-5 (usb)
KERNEL[386996.679545] add /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0 (usb)
UDEV [386998.854067] add /devices/pci0000:00/0000:00:1d.7/usb2/2-5 (usb)
UDEV [387001.218881] add /devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.0 (usb)