[openwrt/openwrt] package/comgt: Handle bind/unbind events

LEDE Commits lede-commits at lists.infradead.org
Fri Jul 2 02:33:55 PDT 2021


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/fc4b5411b3a2105df4655e9623277d88489f6710

commit fc4b5411b3a2105df4655e9623277d88489f6710
Author: Arjun AK <arjunak234 at gmail.com>
AuthorDate: Thu Jul 16 21:22:24 2020 +0530

    package/comgt: Handle bind/unbind events
    
    This script was expecting only add/remove events which has not been the
    case since Kernel 4.12 (which added bind/unbind). Bind events were getting
    treated as remove events which would cause hotplugged 3g modems to not
    work.
    
    More info:
    https://lkml.org/lkml/2018/12/23/128
    https://github.com/systemd/systemd/issues/8221
    
    Signed-off-by: Arjun AK <arjunak234 at gmail.com>
    (cherry picked from commit 89ef883b92b3a87d9ab1bd289de26b9e72681dac)
---
 package/network/utils/comgt/files/3g.usb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/utils/comgt/files/3g.usb b/package/network/utils/comgt/files/3g.usb
index 8f0d62ca83..9c7d07a0e6 100644
--- a/package/network/utils/comgt/files/3g.usb
+++ b/package/network/utils/comgt/files/3g.usb
@@ -23,6 +23,8 @@ find_3g_iface() {
 	fi
 }
 
+[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
+
 case "$DEVICENAME" in
 	tty*)
 		[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0



More information about the lede-commits mailing list