[systemd-devel] udev event on usb unpluged

Robert Milasan rmilasan at suse.com
Wed Aug 26 05:49:44 PDT 2015


On Wed, 26 Aug 2015 14:43:35 +0200 (CEST)
<christophe.jalady at free.fr> wrote:

> >can you show how you confirmed your script receive the "add" event,
> >or how the script "catch" the event?
> 
> Sure: basically I do "echo "USB_$ACTION" >> /tmp/jc.log".
> After plug/wait/unplugged/wait I only see lines "USB_add".
> See attached my .rules and .sh scripts.
> 
> 
> >Can you paste run `udevadm monitor`, plug in your cable/device, wait
> >for a second, unplug it, and paste the output?
> 
> Well, this is the trick: I cannot add a connection to my device _and_
> the usb cable connected to it. So I am not able to monitor the
> process directly from my device. Does the scripts provided are enough
> to help you understanding my problem ?
> 
> Christophe

They are not referring to your device, but the machine on which you are
running the rule.

In a terminal/console you run: udevadm monitor

The do the removal itself and see what 'udevadm monitor' says.


-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A


More information about the systemd-devel mailing list