-   Linux - Newbie (
-   -   udev rules aimed for USB drives only (

xerox 03-14-2011 05:47 AM

udev rules aimed for USB drives only
I have written a udev rule as follows:


Whenever i plug in a USB drive, this rule is executed, however it is also done when i plug in a dongle for WiFi. How do i make this udev rule specific for USB drives only. In other words this script should be run for USB devices only.

ciotog 03-14-2011 11:30 PM

As part of the rule you might specify:

but the WiFi dongle is also a USB device, isn't it?

ciotog 03-14-2011 11:44 PM

This might help:

ATTRS{product}=="Mass Storage Device"
reported from udevinfo (or udevadm info).

So a rule might include this to match only Mass Storage Devices.

xerox 03-15-2011 11:40 PM

yea...dongle is also under usb subsystems...i will try and see...

All times are GMT -5. The time now is 04:06 PM.