From d890f85e59617228b1e76e8cf45a9309904d9124 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 16 Nov 2019 05:11:10 +0300 Subject: [PATCH] wwan: 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] --- package/network/utils/wwan/Makefile | 2 +- package/network/utils/wwan/files/wwan.usbmisc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/utils/wwan/Makefile b/package/network/utils/wwan/Makefile index bb829b5e2c..1c5a5e6669 100644 --- a/package/network/utils/wwan/Makefile +++ b/package/network/utils/wwan/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wwan PKG_VERSION:=2019-04-29 -PKG_RELEASE=4 +PKG_RELEASE=5 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= diff --git a/package/network/utils/wwan/files/wwan.usbmisc b/package/network/utils/wwan/files/wwan.usbmisc index 4079a7fd8f..a86ff5d98b 100644 --- a/package/network/utils/wwan/files/wwan.usbmisc +++ b/package/network/utils/wwan/files/wwan.usbmisc @@ -17,7 +17,8 @@ find_wwan_iface() { [ -z "$device" -a "$proto" = wwan ] || [ "$device" = "/dev/$DEVNAME" ] || return 0 if [ "$ACTION" = add ]; then proto_set_available "$cfg" 1 - else + fi + if [ "$ACTION" = remove ]; then proto_set_available "$cfg" 0 fi exit 0 -- 2.30.2