Skip to contentSkip to conversation

package/network-manager: Enable service under systemd

PATCH New Nathaniel Roach 2 participants 2 messages Dec 2, 2014 – Dec 7, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/network-manager: Enable service under systemd

Previously NetworkManager had to be enabled and started on the first boot manually or by a script.

Add install define with the commands to setup the required service files for automatic start.

---
Changes v1 -> v2
- Corrected the symlinks so they point to the correct files, ensuring the dispatcher service works

 package/network-manager/network-manager.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
package/network-manager/network-manager.mk +13 -0
index 9770cae..3f6512c 100644
@@ -72,4 +72,17 @@ define NETWORK_MANAGER_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager
 endef
 
+define NETWORK_MANAGER_INSTALL_INIT_SYSTEMD
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+	ln -sf /usr/lib/systemd/system/NetworkManager.service \
+		$(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
+
+	ln -sf /usr/lib/systemd/system/NetworkManager.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/NetworkManager.service
+
+	ln -sf /usr/lib/systemd/system/NetworkManager-dispatcher.service \
+		$(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
2.1.3
#1 lore raw

PATCH v2 1/1 package/network-manager: Enable service under systemd

Dear Nathaniel Roach,

Quoted 11 lines · Nathaniel Roach

Previously NetworkManager had to be enabled and started on the first boot manually or by a script.

Add install define with the commands to setup the required service files for automatic start.

---
Changes v1 -> v2
- Corrected the symlinks so they point to the correct files, ensuring the dispatcher service works

Thanks, applied. It would be good if some systemd person such as Eric Le Bihan could have a look.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com