procd: reduce the number of unnecessary calls to /sbin/hotplug-call for tty devices
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 10 Nov 2013 15:06:28 +0000 (15:06 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 10 Nov 2013 15:06:28 +0000 (15:06 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38705 3c298f89-4303-0410-b956-a3cf2f4a3e73

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%" ]
        ],