I've written file 90-usb.rules under /etc/udev/rules.d/ containing:
ACTION=="add", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="2008", RUN+="/bin/mkdir /home/pandya/Desktop/testdir"
ACTION=="remove", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="2008", RUN+="/bin/rmdir /home/pandya/Desktop/testdir"
When I plugged in device udev ACTION=="add" creates directory by means of RUN+="/bin/mkdir /home/pandya/Desktop/testdir" (which works fine)
BUT when I unplugged device similar udev ACTION=="remove doesn't removes directory by means of RUN+="/bin/rmdir /home/pandya/Desktop/testdir"
So, I want to know that Why removal action is not working? How do I fix it?
Aucun commentaire:
Enregistrer un commentaire