[1/1] package/modem-manager: enable systemd services
diff mbox series

Message ID 20191031202250.72364-1-james.hilliard1@gmail.com
State New
Headers show
Series
  • [1/1] package/modem-manager: enable systemd services
Related show

Commit Message

James Hilliard Oct. 31, 2019, 8:22 p.m. UTC
These are normally enabled by systemctl preset-all.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/modem-manager/modem-manager.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Aleksander Morgado Nov. 4, 2019, 1:08 p.m. UTC | #1
On Thu, Oct 31, 2019 at 9:22 PM James Hilliard
<james.hilliard1@gmail.com> wrote:
>
> These are normally enabled by systemctl preset-all.
>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Acked-by: Aleksander Morgado <aleksander@aleksander.es>

> ---
>  package/modem-manager/modem-manager.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk
> index dde841b80a..9673b98716 100644
> --- a/package/modem-manager/modem-manager.mk
> +++ b/package/modem-manager/modem-manager.mk
> @@ -39,4 +39,12 @@ define MODEM_MANAGER_INSTALL_INIT_SYSV
>                 $(TARGET_DIR)/etc/init.d/S44modem-manager
>  endef
>
> +define MODEM_MANAGER_INSTALL_INIT_SYSTEMD
> +       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> +       ln -sf ../../../../lib/systemd/system/ModemManager.service \
> +               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ModemManager.service
> +       ln -sf ../../../lib/systemd/system/ModemManager.service \
> +               $(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service
> +endef
> +
>  $(eval $(autotools-package))
> --
> 2.20.1
>


--
Aleksander
https://aleksander.es

Patch
diff mbox series

diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk
index dde841b80a..9673b98716 100644
--- a/package/modem-manager/modem-manager.mk
+++ b/package/modem-manager/modem-manager.mk
@@ -39,4 +39,12 @@  define MODEM_MANAGER_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S44modem-manager
 endef
 
+define MODEM_MANAGER_INSTALL_INIT_SYSTEMD
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../lib/systemd/system/ModemManager.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ModemManager.service
+	ln -sf ../../../lib/systemd/system/ModemManager.service \
+		$(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.ModemManager1.service
+endef
+
 $(eval $(autotools-package))