linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Strange Rule Behaviour
@ 2006-04-15 21:04 Robert Kennedy
  2006-04-16  6:14 ` Andrey Borzenkov
  2006-04-16 14:53 ` Robert Kennedy
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Kennedy @ 2006-04-15 21:04 UTC (permalink / raw)
  To: linux-hotplug

I have a simple rule that runs a script that creates extra cd related 
symlinks.

The rule is as follows:

ACTION="add", BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", 
RUN+="/lib/udev/cdsymlinks.sh"

This rule works great.  When a new CDRW drive is plugged in, the script is 
called and creates additional symlinks.

I also have a rule to run the same script which will remove these cd 
symlinks when the CDRW driver is removed (e.g. removable CDRW drive).  I 
first tried this rule:

ACTION="remove", BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", 
RUN+="/lib/udev/cdsymlinks.sh"

It did not work.  I could only get the rule to be matched and run when I 
changed the rule to:

ACTION="add", BUS="block", KERNEL="sr[0-9]*",  
RUN+="/lib/udev/cdsymlinks.sh"

I am curious why I had to change the remove rule.  Does anyone have any 
ideas?

Rob




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-16 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-15 21:04 Strange Rule Behaviour Robert Kennedy
2006-04-16  6:14 ` Andrey Borzenkov
2006-04-16 14:53 ` Robert Kennedy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).