[OpenWrt-Devel] [PATCH] procd: hotplug.json: allow passing hotplug events from all subsystems
John Crispin
blogic at openwrt.org
Sat Nov 28 18:13:52 EST 2015
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 <yszhou4tech at 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 at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list