I've written 2 rules in udev for usb add and removed in 2 files.
SUBSYSTEM=="usb", ACTION=="add", RUN+="/u/usb_added %b"
SUBSYSTEM=="usb", ACTION=="remove", RUN+="/u/usb_remove %b"
I have created two different scripts for these rules that take appropriate action (doing same thing).
I want to combine these rules (and then action script) by passing values (add, remove) and then check in new script by if condition. and then take proper action.
so my question is how i can pass parameters in RUN+= "/u/usb_status ??"
how i will get these parameters in new script and then use in if condition.
thanks in advance.