View previous topic :: View next topic |
Author |
Message |
mistake25 Tux's lil' helper

Joined: 20 May 2008 Posts: 144
|
Posted: Sat May 19, 2012 9:25 pm Post subject: udev rules |
|
|
Hi,
I have working usb automounting using udev (or what), but I want to create one custom rule for one flash disk. I want to automatically run script (say autorun.sh) located in root of the flash disk I want this to work just one specific flash disc identified by serial id or whatever. I have problem that I can't find existing udev rules that are used to mount disks nothing in /etc/udev/rules.d or /lib/udev/rules.d/ are there some more udev rules located somewhere else, or I have to create complete new rules?
Thanks |
|
Back to top |
|
 |
BillWho Veteran


Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Sun May 20, 2012 12:00 am Post subject: |
|
|
mistake25,
Plug the flash disk in and use udevadm to find its vendor/device or any unique identifiers with
Code: | udevadm info --attribute-walk --export --name=/dev/sdc |
Then create a rule like 88custom-mount.rules or whatever you want to call it with something like:
Code: | KERNELS=="1-6",SUBSYSTEMS=="usb",DRIVERS=="usb",ATTRS{idVendor}=="152d",ATTRS{idProduct}=="2338",RUN+="/home/bill/script/88scorpio.sh" |
Don't modify an existing rule.
Good luck  _________________ Good luck
Since installing gentoo, my life has become one long emerge  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|