udev rule, continue to next rule only if preb failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

I'm trying to implement the following behavior:
if a usb is added ot removed, run a script before all other existing rules but continue to existing iff the script failed
I've added the following rule to /etc/udev/rules.d/5-usb_vm.rules:
ACTION=="add", SUBSYSTEM=="usb", RUN="/usr/local/bin/handle_udev_action"
ACTION=="remove", SUBSYSTEM=="usb", RUN="/usr/local/bin/handle_udev_action"

/usr/local/bin/handle_udev_action runs exit 1 iff the device is a specific one (for testing)
but the code continues to the next rule.
is there any way to stop it if the script returned 9?

Thanks

Dagg





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux