aboutsummaryrefslogtreecommitdiff
path: root/package/netplug/netplug.mk
diff options
context:
space:
mode:
authorGravatar Alex Suykov <alex.suykov@gmail.com>2015-05-23 13:05:57 +0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-13 23:23:57 +0200
commitb8da356e5d81d4e87c74c093a7d27d4dc030b87f (patch)
treed3776064434862b926bac8c49ed862b04dae94ae /package/netplug/netplug.mk
parentea63dc42cdea4640fa427e838a7056248a1b0ce2 (diff)
downloadbuildroot-b8da356e5d81d4e87c74c093a7d27d4dc030b87f.tar.gz
buildroot-b8da356e5d81d4e87c74c093a7d27d4dc030b87f.tar.bz2
netplug: systemd support
[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>
Diffstat (limited to 'package/netplug/netplug.mk')
-rw-r--r--package/netplug/netplug.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk
index 0bd7c788ae..aeebcad2ee 100644
--- a/package/netplug/netplug.mk
+++ b/package/netplug/netplug.mk
@@ -23,4 +23,12 @@ define NETPLUG_INSTALL_INIT_SYSV
$(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))