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
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Fri Mar 25, 2005 8:54 pm    Post subject: UDEV rules Reply with quote

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


Joined: 06 Aug 2004
Posts: 385
Location: kasimlar yaylasi

PostPosted: Fri Mar 25, 2005 11:43 pm    Post subject: Reply with quote

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
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