[systemd-devel] udev “PROGRAM/RUN” command not working properly for “REMOVE” action

Martin Wilck mwilck at suse.de
Fri Feb 1 15:38:51 UTC 2019


On Thu, 2019-01-31 at 14:46 +0100, Ziemowit Podwysocki wrote:
> 
>     ACTION=="remove", SUBSYSTEM=="usb", DRIVER=="usb",
> ATTRS{idVendor}=="1244", ATTRS{idProduct}=="206d", RUN+="/bin/touch
> /home/user/udev/%k"
> 
> This one suppose to create file named after "KERNEL" param of the
> device. This is also not happening! But for action "add" it works!

Have you tried udev debugging (udevadm control -l debug)?

I'd do that, and that I'd remove some conditions and see if one of them
is not (or unreliably) set on remove events, and thus causing your rule
not to be run. E.g. start with 

  ACTION=="remove", RUN+="..."

and then add the original conditions one by one.

Regards
Martin




More information about the systemd-devel mailing list