summaryrefslogtreecommitdiffstats
path: root/package/bind/bind.mk
diff options
context:
space:
mode:
authorNathaniel Roach <nroach44@gmail.com>2015-01-11 13:31:36 +0800
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-01-12 22:22:20 +0100
commitc45c3ed8adc0b717036951729c7155f75d29db8a (patch)
tree48af5fde7ddc3485e8f75f5cb872d34f13591b6e /package/bind/bind.mk
parenta5f3db697f37d81b87a99dc3fdce9a6a7f4e0754 (diff)
downloadbuildroot-c45c3ed8adc0b717036951729c7155f75d29db8a.tar.gz
buildroot-c45c3ed8adc0b717036951729c7155f75d29db8a.zip
bind: Add systemd unit file and install it to run at startup.
The unit file is taken from debian, but tested working. We'll call it named.service to match the sysV initscript. Signed-off-by: Nathaniel Roach <nroach44@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/bind/bind.mk')
-rw-r--r--package/bind/bind.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/bind/bind.mk b/package/bind/bind.mk
index 983fa20f5b..a98a4c4e57 100644
--- a/package/bind/bind.mk
+++ b/package/bind/bind.mk
@@ -82,6 +82,15 @@ define BIND_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/bind/S81named \
$(TARGET_DIR)/etc/init.d/S81named
endef
+define BIND_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/bind/named.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/named.service
+
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+ ln -sf /usr/lib/systemd/system/named.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/named.service
+endef
else
BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER
endif
OpenPOWER on IntegriCloud