UDEV: how to match SYMLINK during remove event?

Posted by Magicloud on Ask Ubuntu See other posts from Ask Ubuntu or by Magicloud
Published on 2013-10-29T10:02:00Z Indexed on 2013/10/29 10:19 UTC
Read the original article Hit count: 230

Filed under:

I am using libusb to contact with a printer. And I am writing a rule for udev to remove the printer when it is disconnected. I use symlink to indicate the device. But when removing, the rule is not triggered. What should I do?

ATTRS{manufacturer}=="Zebra Technologies", ACTION=="add", RUN+="/usr/local/bin/reinitZebra.sh", SYMLINK+="usblp%k" SYMLINK=="usblp%k", ACTION=="remove", RUN+="/usr/local/bin/reinitZebra.sh"

© Ask Ubuntu or respective owner

Related posts about udev