Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev rules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mistake25
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 144

PostPosted: Sat May 19, 2012 9:25 pm    Post subject: udev rules Reply with quote

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
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun May 20, 2012 12:00 am    Post subject: Reply with quote

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 :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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