linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Thinstation-developer] Re: udev PROGRAM  action
@ 2005-08-24  9:23 Miles Roper
  2005-08-24 10:11 ` Kay Sievers
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Miles Roper @ 2005-08-24  9:23 UTC (permalink / raw)
  To: linux-hotplug

Hi Kay,

thanks for replying so quick.

Ok that makes sense.  what i've been playing with recently is...

KERNEL="sd*", ACTION="add", NAME="%k", RUN=+"/etc/udev/scripts/usb.sh %k"
KERNEL="sd*", ACTION="remove", NAME="%k", RUN=+"/etc/udev/scripts/usb.sh %k"

what i'm trying to achieve is hotpluging my usbkey.  removing the NAME key above still doesn't seem 
to work, infact it stops it from even calling the script. the line now is

KERNEL="sd*", BUS="usb", RUN=+"/etc/udev/scripts/usb.sh %k"

if I remove the NAME key, how can I specify the device name I want in /dev?  Can I use the %k in 
above, as I need to pass this to the script so I know which device to mount/umount?

thanks

Miles

Kay Sievers wrote:
> On Wed, Aug 24, 2005 at 07:47:54PM +1200, Miles Roper wrote:
> 
>>Hi,
>>
>>I've been trolling around the net trying to find an answer to why I can't 
>>get udev to correctly run a remove event in a script.
>>
>>here is my udev line
>>
>>BUS="usb", KERNEL="sd*", NAME="%k", PROGRAM="/etc/udev/scripts/usb.sh %k"
>>
>>this works fine.  it calls the script below...
> 
> 
> ...
> 
> 
>>the add event works great.  however, the remove event never gets actioned.  
>>In fact the script never gets run when the device is removed.  any ideas 
>>why?
> 
> 
> PROGRAM is for evaluation of the device name. It is called before the
> device node is created. If you have NAME in a rule, the rule will never
> be called for any ather action than "add". Just remove "NAME="%k".
> 
> And better use RUN, it is called after device node handling.
> 
> Kay
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Thinstation-developer mailing list
> Thinstation-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/thinstation-developer
> 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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] 13+ messages in thread

end of thread, other threads:[~2005-08-31  7:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-24  9:23 [Thinstation-developer] Re: udev PROGRAM action Miles Roper
2005-08-24 10:11 ` Kay Sievers
2005-08-24 10:17 ` Miles Roper
2005-08-24 10:39 ` Kay Sievers
2005-08-24 11:05 ` Miles Roper
2005-08-24 13:47 ` Bill Nottingham
2005-08-24 15:30 ` Christian Zoz
2005-08-24 19:06 ` Kay Sievers
2005-08-24 19:27 ` Thierry Vignaud
2005-08-25 10:53 ` Miles Roper
2005-08-25 11:55 ` Kay Sievers
2005-08-25 12:03 ` Miles Roper
2005-08-31  7:20 ` Greg KH

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