[Thomas: use relative symlink instead of absolute symlink.]
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
$(TARGET_DIR)/etc/init.d/S29netplug
endef
+define NETPLUG_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/netplug/netplug.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/netplug.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../../usr/lib/systemd/system/netplug.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/netplug.service
+endef
+
$(eval $(generic-package))
--- /dev/null
+[Unit]
+Description=Network cable hotplug management daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/sbin/netplugd -F
+Restart=always
+
+[Install]
+WantedBy=multi-user.target