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 <aleksander@aleksander.es>
This commit is contained in:
parent
ecad39fd60
commit
5f11888b12
5 changed files with 7 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue