From 1eb5a644459f16219410ee53f47b7d2d082e17a1 Mon Sep 17 00:00:00 2001 From: Bian Naimeng Date: Mon, 16 Feb 2015 11:14:35 +0800 Subject: ipsec-tools: add systemd supported Signed-off-by: Bian Naimeng Signed-off-by: Martin Jansa Signed-off-by: Joe MacDonald --- .../recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb') diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb index 7519d8376..9704b138c 100644 --- a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb @@ -16,11 +16,13 @@ SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV file://glibc-2.20.patch \ file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \ file://racoon.conf.sample \ + file://racoon.conf \ + file://racoon.service \ " SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" -inherit autotools +inherit autotools systemd # Options: # --enable-adminport enable admin port @@ -68,4 +70,15 @@ PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,l do_install_append() { install -d ${D}${sysconfdir}/racoon install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system + + sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service + sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service + + install -d ${D}${sysconfdir}/default/ + install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon + fi } -- cgit v1.2.3-54-g00ecf