From 5f11888b124f7599fc93af13c5d2c63d08d4efe4 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 27 Nov 2019 09:24:07 +0100 Subject: [PATCH] modemmanager: install common utils in /usr/share/ModemManager 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 --- net/modemmanager/Makefile | 6 ++---- net/modemmanager/files/25-modemmanager-net | 2 +- net/modemmanager/files/25-modemmanager-tty | 2 +- net/modemmanager/files/25-modemmanager-usb | 2 +- net/modemmanager/files/modemmanager.init | 4 ++-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index eb8f051fe..e616bc070 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:=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 diff --git a/net/modemmanager/files/25-modemmanager-net b/net/modemmanager/files/25-modemmanager-net index df15dafb2..e87231e31 100644 --- a/net/modemmanager/files/25-modemmanager-net +++ b/net/modemmanager/files/25-modemmanager-net @@ -3,7 +3,7 @@ # Copyright (C) 2016 Aleksander Morgado # Load common utilities -. /etc/modemmanager/modemmanager.common +. /usr/share/ModemManager/modemmanager.common # We require a interface name [ -n "${INTERFACE}" ] || exit diff --git a/net/modemmanager/files/25-modemmanager-tty b/net/modemmanager/files/25-modemmanager-tty index 60548dd66..c13148a33 100644 --- a/net/modemmanager/files/25-modemmanager-tty +++ b/net/modemmanager/files/25-modemmanager-tty @@ -3,7 +3,7 @@ # Copyright (C) 2016 Aleksander Morgado # Load hotplug common utilities -. /etc/modemmanager/modemmanager.common +. /usr/share/ModemManager/modemmanager.common # We require a device name [ -n "$DEVNAME" ] || exit diff --git a/net/modemmanager/files/25-modemmanager-usb b/net/modemmanager/files/25-modemmanager-usb index 8ca8ba10f..93d0bf70a 100644 --- a/net/modemmanager/files/25-modemmanager-usb +++ b/net/modemmanager/files/25-modemmanager-usb @@ -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}" diff --git a/net/modemmanager/files/modemmanager.init b/net/modemmanager/files/modemmanager.init index 45a2ba11a..4c9548654 100755 --- a/net/modemmanager/files/modemmanager.init +++ b/net/modemmanager/files/modemmanager.init @@ -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}"