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 4821ff064b)
Fixes: FS#3351
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
openwrt-19.07
Rozhuk Ivan 2019-11-16 05:10:05 +03:00 committed by Jo-Philipp Wich
parent 34a9652904
commit 86b44028e2
2 changed files with 5 additions and 5 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=comgt PKG_NAME:=comgt
PKG_VERSION:=0.32 PKG_VERSION:=0.32
PKG_RELEASE:=32 PKG_RELEASE:=33
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/comgt PKG_SOURCE_URL:=@SF/comgt

View File

@ -15,11 +15,11 @@ find_3g_iface() {
if [ "${dev##*/}" = "${tty##*/}" ]; then if [ "${dev##*/}" = "${tty##*/}" ]; then
if [ "$ACTION" = add ]; then if [ "$ACTION" = add ]; then
available=1 proto_set_available "$cfg" 1
else fi
available=0 if [ "$ACTION" = remove ]; then
proto_set_available "$cfg" 0
fi fi
proto_set_available "$cfg" $available
fi fi
} }