procd: emit tty events for ttyUSB* even when they come from the usb-serial subsystem
[openwrt-github/.git] / package / system / procd / files / hotplug.json
index bcd169034b342d405a2802cca292524b11d04252..b3121789e0ace21917ba3989ad7f34c59fac8f1e 100644 (file)
                [ "exec", "/etc/rc.button/%BUTTON%" ]
        ],
        [ "if",
-               [ "or",
+               [ "eq", "SUBSYSTEM",
+                       [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "tty", "button" ]
+               ],
+               [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+       ],
+       [ "if",
+               [ "and",
                        [ "eq", "SUBSYSTEM",
-                               [ "net", "input", "usb", "ieee1394", "block", "atm", "zaptel", "button" ],
+                               [ "tty", "usb-serial" ]
                        ],
-                       [ "and",
-                               [ "eq", "SUBSYSTEM", "tty" ],
-                               [ "regex", "DEVNAME", "^ttyUSB" ],
-                       ]
+                       [ "regex", "DEVNAME", "^ttyUSB" ],
                ],
-               [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+               [ "exec", "/sbin/hotplug-call", "tty" ]
        ],
 ]