procd: reduce the number of unnecessary calls to /sbin/hotplug-call for tty devices
[openwrt.git] / package / system / procd / files / hotplug.json
index 8285311..bcd1690 100644 (file)
                [ "exec", "/etc/rc.button/%BUTTON%" ]
        ],
        [ "if",
-               [ "eq", "SUBSYSTEM",
-                       [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+               [ "or",
+                       [ "eq", "SUBSYSTEM",
+                               [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "button" ],
+                       ],
+                       [ "and",
+                               [ "eq", "SUBSYSTEM", "tty" ],
+                               [ "regex", "DEVNAME", "^ttyUSB" ],
+                       ]
                ],
                [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
        ],