summaryrefslogtreecommitdiff
path: root/net/modemmanager/Makefile
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-11-20 12:49:11 +0100
committerAleksander Morgado <aleksander@aleksander.es>2019-11-27 09:28:10 +0100
commita684cdbab0495e133e9155f33a16c866986187cf (patch)
tree18a0d019f1693192c8af8d265abe049bf8313a06 /net/modemmanager/Makefile
parentcc4ee2fd3c7ce84ec90c60778caf46bf4342f7d0 (diff)
modemmanager: fix device unplug handling
When a USB modem device is unplugged, we had to do two different things: first, cleanup the sysfs cache; and second, set interface as unavailable. Those two things were never being done properly due to several different issues: * The parent sysfs path retrieval logic relies on checking for which sysfs path has the vid/pid files. This logic obviously only works when the device is available, and cannot be used on e.g. removal events. * The command to cleanup the modem wait status from the sysfs cache was not removing the previous state properly, because the sysfs path variable wasn't escaped properly for the sed command. This patch handles those issues in order to have a proper device removal handling, by making sure the sysfs path is properly escaped in the sed command, and by introducing a new hotplug script that runs when the full USB device is removed. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Diffstat (limited to 'net/modemmanager/Makefile')
-rw-r--r--net/modemmanager/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile
index 952f7c3e7..0c73a8880 100644
--- a/net/modemmanager/Makefile
+++ b/net/modemmanager/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager
PKG_VERSION:=1.12.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
@@ -123,6 +123,9 @@ define Package/modemmanager/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
+ $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+ $(INSTALL_DATA) ./files/25-modemmanager-usb $(1)/etc/hotplug.d/usb
+
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
$(INSTALL_DATA) ./files/25-modemmanager-net $(1)/etc/hotplug.d/net