From: Rozhuk Ivan Date: Sat, 16 Nov 2019 02:10:05 +0000 (+0300) Subject: comgt: fix hotplug event handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4821ff064b735c320ae2625a739018d1fc7d6457;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Hans Dedecker [PKG_RELEASE increase] --- diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 64296c9852e4..db5ea5747357 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 ac8326b710cf..8f0d62ca83a5 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 }