aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils
diff options
context:
space:
mode:
authorArjun AK <arjunak234@gmail.com>2020-07-16 21:22:24 +0530
committerPetr Štetiar <ynezz@true.cz>2021-07-02 11:09:57 +0200
commit89ef883b92b3a87d9ab1bd289de26b9e72681dac (patch)
treeb4e2abdb97a36dbb59600850320f930e0f9b781a /package/network/utils
parent04942780734da56626d088d824a6117a74757637 (diff)
downloadupstream-89ef883b92b3a87d9ab1bd289de26b9e72681dac.tar.gz
upstream-89ef883b92b3a87d9ab1bd289de26b9e72681dac.tar.bz2
upstream-89ef883b92b3a87d9ab1bd289de26b9e72681dac.zip
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@gmail.com>
Diffstat (limited to 'package/network/utils')
-rw-r--r--package/network/utils/comgt/files/3g.usb2
1 files changed, 2 insertions, 0 deletions
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