diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2019-11-16 05:10:05 +0300 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-09-19 19:48:27 +0200 |
commit | 86b44028e2123a199d9ff9cfc1585696bed7af53 (patch) | |
tree | d27440c6c6eaf0128c29ca3cbb54ac1a8ea640b2 | |
parent | 34a96529041d4e9502c490c66f8af0154187c6d2 (diff) | |
download | upstream-86b44028e2123a199d9ff9cfc1585696bed7af53.tar.gz upstream-86b44028e2123a199d9ff9cfc1585696bed7af53.tar.bz2 upstream-86b44028e2123a199d9ff9cfc1585696bed7af53.zip |
comgt: fix hotplug event handling
Hotplug manager send: "remove" -> "add" -> "bind" events,
script interpret bind as "not add" = "remove" and mark device
as unavailable.
Signed-off-by: Rozhuk Ivan <rozhuk.im@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
(cherry picked from commit 4821ff064b735c320ae2625a739018d1fc7d6457)
Fixes: FS#3351
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | package/network/utils/comgt/Makefile | 2 | ||||
-rw-r--r-- | package/network/utils/comgt/files/3g.usb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 64296c9852..db5ea57473 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=32 +PKG_RELEASE:=33 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/3g.usb b/package/network/utils/comgt/files/3g.usb index ac8326b710..8f0d62ca83 100644 --- a/package/network/utils/comgt/files/3g.usb +++ b/package/network/utils/comgt/files/3g.usb @@ -15,11 +15,11 @@ find_3g_iface() { if [ "${dev##*/}" = "${tty##*/}" ]; then if [ "$ACTION" = add ]; then - available=1 - else - available=0 + proto_set_available "$cfg" 1 + fi + if [ "$ACTION" = remove ]; then + proto_set_available "$cfg" 0 fi - proto_set_available "$cfg" $available fi } |