diff options
author | John Crispin <blogic@openwrt.org> | 2016-02-26 08:35:43 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2016-02-26 08:35:43 +0000 |
commit | a83e1e412c1499a4bd8e4c25e1207dcd78a5b35c (patch) | |
tree | 74234a5183154177a1c8cb1a6448d69abd8212b6 | |
parent | 4d2ee015809da7d6f0453d72b4ada5195788daa9 (diff) | |
download | master-187ad058-a83e1e412c1499a4bd8e4c25e1207dcd78a5b35c.tar.gz master-187ad058-a83e1e412c1499a4bd8e4c25e1207dcd78a5b35c.tar.bz2 master-187ad058-a83e1e412c1499a4bd8e4c25e1207dcd78a5b35c.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48799 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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%" ] + ] ], ] |