View previous topic :: View next topic |
Author |
Message |
echo6 Guru
Joined: 04 Jan 2003 Posts: 587
|
Posted: Fri Mar 25, 2005 8:54 pm Post subject: UDEV rules |
|
|
I've been tinkering with udev rules, my own local file is /etc/rules.d/10-local.rules. I'm trying to get a script to execute when I plug my sandisk usb thumb drive. The rule I currently have is
Code: | BUS="usb", SYSFS{serial}="SNDK99FDE4002DE06405", NAME="%k", SYMLINK="sandisk%n" | My understanding is that I can supply a further argument i.e. PROGRAM="/etc/init.d/rules.d/scripts/sandisk.sh" so that the shell script gets executed when I put the thumb drive in. I'm clearly missing something here as placing this argument in the rule file does not work. Any ideas?
My aim is to create scripts for each of my usb storage devices so that appropriate icons appear on my KDE desktop. |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Fri Mar 25, 2005 11:43 pm Post subject: |
|
|
I am not sure about udev executing a script, But you can do the same thing easly with hotplug. You just need to write *.usermap and a agent. usermap matches the device you plugged in and the agent does whatever you need to to with the device. For examples look at /etc/hotplug/usb/. |
|
Back to top |
|
|
|