summaryrefslogtreecommitdiffstats
path: root/package/system/procd
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-02-26 08:35:43 +0000
committerJohn Crispin <john@openwrt.org>2016-02-26 08:35:43 +0000
commit4f3c1e779364394a7e8f9f45ee824e0dff556cec (patch)
tree5f7b393d3b94b92dd582d7b4ea89d0d4594097e3 /package/system/procd
parent3aceb54a3b7d542799a348984de9df741d1c6ebb (diff)
downloadmaster-31e0f0ae-4f3c1e779364394a7e8f9f45ee824e0dff556cec.tar.gz
master-31e0f0ae-4f3c1e779364394a7e8f9f45ee824e0dff556cec.tar.bz2
master-31e0f0ae-4f3c1e779364394a7e8f9f45ee824e0dff556cec.zip
procd: hotplug.json: allow passing hotplug events from all subsystems
There are time that programs need to be notified of events from subsystems that are not enumerated in the .json definition, e.g. QEMU guest agent by default requires /dev/virtio-ports/org.qemu.guest_agent.0 which is a symlink to /dev/vportMpN from virtio-ports subsystem. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 48799
Diffstat (limited to 'package/system/procd')
-rw-r--r--package/system/procd/files/hotplug.json18
1 files changed, 6 insertions, 12 deletions
diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json
index 516a122f0e..e2f1604542 100644
--- a/package/system/procd/files/hotplug.json
+++ b/package/system/procd/files/hotplug.json
@@ -58,10 +58,6 @@
]
} ],
[ "if",
- [ "eq", "SUBSYSTEM", "platform" ],
- [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
- ],
- [ "if",
[ "and",
[ "has", "BUTTON" ],
[ "eq", "SUBSYSTEM", "button" ],
@@ -69,18 +65,16 @@
[ "button", "/etc/rc.button/%BUTTON%" ]
],
[ "if",
- [ "eq", "SUBSYSTEM",
- [ "net", "input", "usb", "usbmisc", "ieee1394", "block", "atm", "zaptel", "tty", "button", "sound" ]
- ],
- [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
- ],
- [ "if",
[ "and",
[ "eq", "SUBSYSTEM", "usb-serial" ],
[ "regex", "DEVNAME",
[ "^ttyUSB", "^ttyACM" ]
- ],
+ ]
],
- [ "exec", "/sbin/hotplug-call", "tty" ]
+ [ "exec", "/sbin/hotplug-call", "tty" ],
+ [ "if",
+ [ "isdir", "/etc/hotplug.d/%SUBSYSTEM%" ],
+ [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ]
+ ]
],
]