diff options
author | John Crispin <john@openwrt.org> | 2016-02-26 08:35:43 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-02-26 08:35:43 +0000 |
commit | 4f3c1e779364394a7e8f9f45ee824e0dff556cec (patch) | |
tree | 5f7b393d3b94b92dd582d7b4ea89d0d4594097e3 /package | |
parent | 3aceb54a3b7d542799a348984de9df741d1c6ebb (diff) | |
download | upstream-4f3c1e779364394a7e8f9f45ee824e0dff556cec.tar.gz upstream-4f3c1e779364394a7e8f9f45ee824e0dff556cec.tar.bz2 upstream-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')
-rw-r--r-- | package/system/procd/files/hotplug.json | 18 |
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%" ] + ] ], ] |