Is it possible (and if so how) to tell udev to stop executing further rules for a certain device?
I know that there is an order/sequence of rules by the alphabetical naming of the udev files. Therefore it seems logical that earlier *.rules
might want to prevent further (that is in the order later occuring rules) to be executed.
Let us assume I have a usb-memory-media which is via udev and its RUN+ script already mounted, I would dislike now that any other rule in the system tries (and probably fails) to yet again mount the device!
To facilitate responding I would like to also include an example: Let the rule be like this:
# in file 30.myusb.rules ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.30.1f75.0902.sh"
now I want this further (because of 31 > 30) rule not to happen
# in file 31.myusb.rules ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.31.1f75.0902.sh"
the "filter" used to make udev able to tell if the rule applies is the same for both rules, yet I wished the 31.myusb.rules rule not ever to happen.
I am looking hence for a way to tweek 30.myusb.rules
in such a pseudo-code suggested way
# in file 30.myusb.rules ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", RUN+="/bin/mount.30.1f75.0902.sh" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1f75", ATTRS{idProduct}=="0902", STOP_FURTHER_RULES_WITH_THIS_FILTER