John, How about generate the subsystem list from /etc/hotplug.d dirs. The list could be loaded at startup and refreshed the same way hotplug.json is ( which might be "never" as procd does not have an "init q").
Regards, Luiz Em sáb, 28 de nov de 2015 21:14, John Crispin <blo...@openwrt.org> escreveu: > Hi Yousong, > > On 28/11/2015 05:22, Yousong Zhou wrote: > > 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. > > > > i am not sure if this is a good idea. there are thousands of events > being broadcast, specially during boot and we really want to avoid > respawning the script helper for each one of them. i was under the > impression that we had an include directive that allowed us to include > board/target specific json files. however i am failing to find the code > that does this so the feature might not actually be implemented yet. > i'll need to have a closer look at this the next days. > > John > > > Signed-off-by: Yousong Zhou <yszhou4t...@gmail.com> > > --- > > package/system/procd/files/hotplug.json | 9 ++------- > > 1 file changed, 2 insertions(+), 7 deletions(-) > > > > diff --git a/package/system/procd/files/hotplug.json > b/package/system/procd/files/hotplug.json > > index 27b4836..bad2340 100644 > > --- a/package/system/procd/files/hotplug.json > > +++ b/package/system/procd/files/hotplug.json > > @@ -69,18 +69,13 @@ > > [ "button", "/etc/rc.button/%BUTTON%" ] > > ], > > [ "if", > > - [ "eq", "SUBSYSTEM", > > - [ "net", "input", "usb", "usbmisc", "ieee1394", > "block", "atm", "zaptel", "tty", "button" ] > > - ], > > - [ "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" ], > > + [ "exec", "/sbin/hotplug-call", "%SUBSYSTEM%" ] > > ], > > ] > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -- Luiz Angelo Daros de Luca
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel