[OpenWrt-Devel] [PATCH] procd: hotplug.json: allow passing hotplug events from all subsystems

Yousong Zhou yszhou4tech at gmail.com
Fri Nov 27 23:28:28 EST 2015


On 28 November 2015 at 12:22, Yousong Zhou <yszhou4tech at gmail.com> 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.
>

For the record, the PR about qemu-ga is at
https://github.com/openwrt/packages/pull/2041

                yousong

> 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%" ]
>         ],
>  ]
> --
> 2.6.3
>
_______________________________________________
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