Browse Source

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>
lilik-openwrt-22.03
Aleksander Morgado 5 years ago
parent
commit
5f11888b12
5 changed files with 7 additions and 9 deletions
  1. +2
    -4
      net/modemmanager/Makefile
  2. +1
    -1
      net/modemmanager/files/25-modemmanager-net
  3. +1
    -1
      net/modemmanager/files/25-modemmanager-tty
  4. +1
    -1
      net/modemmanager/files/25-modemmanager-usb
  5. +2
    -2
      net/modemmanager/files/modemmanager.init

+ 2
- 4
net/modemmanager/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=modemmanager PKG_NAME:=modemmanager
PKG_VERSION:=1.12.0 PKG_VERSION:=1.12.0
PKG_RELEASE:=7
PKG_RELEASE:=8
PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
@ -119,6 +119,7 @@ define Package/modemmanager/install
$(INSTALL_DIR) $(1)/usr/share/ModemManager $(INSTALL_DIR) $(1)/usr/share/ModemManager
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(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_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager $(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_DIR) $(1)/etc/hotplug.d/tty
$(INSTALL_DATA) ./files/25-modemmanager-tty $(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_DIR) $(1)/lib/netifd/proto
$(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh $(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
endef endef


+ 1
- 1
net/modemmanager/files/25-modemmanager-net View File

@ -3,7 +3,7 @@
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es> # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
# Load common utilities # Load common utilities
. /etc/modemmanager/modemmanager.common
. /usr/share/ModemManager/modemmanager.common
# We require a interface name # We require a interface name
[ -n "${INTERFACE}" ] || exit [ -n "${INTERFACE}" ] || exit


+ 1
- 1
net/modemmanager/files/25-modemmanager-tty View File

@ -3,7 +3,7 @@
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es> # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
# Load hotplug common utilities # Load hotplug common utilities
. /etc/modemmanager/modemmanager.common
. /usr/share/ModemManager/modemmanager.common
# We require a device name # We require a device name
[ -n "$DEVNAME" ] || exit [ -n "$DEVNAME" ] || exit


+ 1
- 1
net/modemmanager/files/25-modemmanager-usb View File

@ -7,7 +7,7 @@
[ -z "${INTERFACE}" ] || exit [ -z "${INTERFACE}" ] || exit
# Load common utilities # Load common utilities
. /etc/modemmanager/modemmanager.common
. /usr/share/ModemManager/modemmanager.common
mm_clear_modem_wait_status "/sys${DEVPATH}" mm_clear_modem_wait_status "/sys${DEVPATH}"
mm_cleanup_interface_by_sysfspath "/sys${DEVPATH}" mm_cleanup_interface_by_sysfspath "/sys${DEVPATH}"

+ 2
- 2
net/modemmanager/files/modemmanager.init View File

@ -6,14 +6,14 @@ START=70
stop_service() { stop_service() {
# Load common utils # Load common utils
. /etc/modemmanager/modemmanager.common
. /usr/share/ModemManager/modemmanager.common
# Set all configured interfaces as unavailable # Set all configured interfaces as unavailable
mm_cleanup_interfaces mm_cleanup_interfaces
} }
start_service() { start_service() {
# Load common utils # Load common utils
. /etc/modemmanager/modemmanager.common
. /usr/share/ModemManager/modemmanager.common
# Always make sure the rundir exists # Always make sure the rundir exists
mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}" mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"


Loading…
Cancel
Save