UDEV: how to match SYMLINK during remove event?
- by Magicloud
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"