linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev remove problems
@ 2007-08-25 22:22 Juergen Bausa
  2007-08-25 22:42 ` Kay Sievers
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Juergen Bausa @ 2007-08-25 22:22 UTC (permalink / raw)
  To: linux-hotplug

udev remove problems

I am using udev 0.105-4 on debian etch. I am trying to setup rules for pvr (hard disk recorder) 
that is connected to my system via usb. Add and remove events should start scripts. The add 
event works fine:

ACTION="add", SYSFS{idVendor}="11db", SYSFS{idProduct}="1000", MODE="0660", \
  GROUP="toppy", RUN+="/usr/local/bin/tf5000pvr_udev"

In my first try, I used the following for remove:

ACTION="remove", SYSFS{idVendor}="11db", SYSFS{idProduct}="1000",  \
  RUN+="/usr/local/bin/tf5000pvr_udev"

This did not work (in the case of remove nothing happens). I think its because sysfs 
values are already gone in case of an remove event. I found a hint on this on the web 
and tried the following:

ACTION="add", SYSFS{idVendor}="11db", SYSFS{idProduct}="1000", MODE="0660", \
  GROUP="toppy", RUN+="/usr/local/bin/tf5000pvr_udev", ENV{toppy}="%p"

ACTION="remove", ENV{toppy}="%p" , RUN+="/usr/local/bin/tf5000pvr_udev"

But it makes no difference: add works fine, but remove doesnt. I used udevmonitor --env 
to see what is happening and found the following:

...

UDEV  [1188080046.847665] remove@/devices/pci0000:00/0000:00:0b.1/usb1/1-2/1-2.1/usbdev1.8_ep00
UDEV_LOG=3
ACTION=remove
DEVPATH=/devices/pci0000:00/0000:00:0b.1/usb1/1-2/1-2.1/usbdev1.8_ep00
SUBSYSTEM=usb_endpoint
SEQNUM\x1132
MAJORD2
MINOR=7
UDEVD_EVENT=1
toppy=/devices/pci0000:00/0000:00:0b.1/usb1/1-2/1-2.1/usbdev1.8_ep00
DEVNAME=/dev/usbdev1.8_ep00

...

So, the variable is saved and found on the remove event, but the script isnt called. What is wrong here? 

Juergen
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc\x100071&distributionid\00000000066


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2007-08-29 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-25 22:22 udev remove problems Juergen Bausa
2007-08-25 22:42 ` Kay Sievers
2007-08-26 21:46 ` Juergen Bausa
2007-08-26 22:10 ` Kay Sievers
2007-08-28 19:48 ` Juergen Bausa
2007-08-29  4:26 ` Kay Sievers
2007-08-29 19:32 ` Juergen Bausa

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