modemmanager: install common utils in /usr/share/ModemManager
authorAleksander Morgado <aleksander@aleksander.es>
Wed, 27 Nov 2019 08:24:07 +0000 (09:24 +0100)
committerAleksander Morgado <aleksander@aleksander.es>
Wed, 27 Nov 2019 08:28:10 +0000 (09:28 +0100)
The modemmanager.common file includes several utility functions that
are used in several places like the protocol handler and in hotplug
scripts. These utilities should not be installed in /etc as they're
not configuration.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
net/modemmanager/Makefile
net/modemmanager/files/25-modemmanager-net
net/modemmanager/files/25-modemmanager-tty
net/modemmanager/files/25-modemmanager-usb
net/modemmanager/files/modemmanager.init

index eb8f051fe29d4a98989f19fae4b12b50c00d4e4e..e616bc0703bc5fd65241cfcfd56011275361053c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=modemmanager
 PKG_VERSION:=1.12.0
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
@@ -119,6 +119,7 @@ define Package/modemmanager/install
 
        $(INSTALL_DIR) $(1)/usr/share/ModemManager
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager
+       $(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager
 
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
@@ -132,9 +133,6 @@ define Package/modemmanager/install
        $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
        $(INSTALL_DATA) ./files/25-modemmanager-tty $(1)/etc/hotplug.d/tty
 
-       $(INSTALL_DIR) $(1)/etc/modemmanager
-       $(INSTALL_DATA) ./files/modemmanager.common $(1)/etc/modemmanager/modemmanager.common
-
        $(INSTALL_DIR) $(1)/lib/netifd/proto
        $(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
 endef
index df15dafb225d86cf46cacd53aa20da16a3ce9383..e87231e31f56b0c5384cf80186dd891b72f0144c 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
 
 # Load common utilities
-. /etc/modemmanager/modemmanager.common
+. /usr/share/ModemManager/modemmanager.common
 
 # We require a interface name
 [ -n "${INTERFACE}" ] || exit
index 60548dd66972753b1ce04db1ea79059ee288f03d..c13148a33dad382f0dd7a6a54323267b244bffe2 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
 
 # Load hotplug common utilities
-. /etc/modemmanager/modemmanager.common
+. /usr/share/ModemManager/modemmanager.common
 
 # We require a device name
 [ -n "$DEVNAME" ] || exit
index 8ca8ba10f16c9d40cfe52d325cf65f7f3afcdc3e..93d0bf70ac5cdfb6d314adf6dcbf78b083774f1a 100644 (file)
@@ -7,7 +7,7 @@
 [ -z "${INTERFACE}" ] || exit
 
 # Load common utilities
-. /etc/modemmanager/modemmanager.common
+. /usr/share/ModemManager/modemmanager.common
 
 mm_clear_modem_wait_status "/sys${DEVPATH}"
 mm_cleanup_interface_by_sysfspath "/sys${DEVPATH}"
index 45a2ba11a7a12035939770df70d24bd4e20b3ff3..4c954865484bee6c60924cc536c847d186db1cc3 100755 (executable)
@@ -6,14 +6,14 @@ START=70
 
 stop_service() {
        # Load common utils
-       . /etc/modemmanager/modemmanager.common
+       . /usr/share/ModemManager/modemmanager.common
        # Set all configured interfaces as unavailable
        mm_cleanup_interfaces
 }
 
 start_service() {
        # Load common utils
-       . /etc/modemmanager/modemmanager.common
+       . /usr/share/ModemManager/modemmanager.common
 
        # Always make sure the rundir exists
        mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"