diff options
3 files changed, 33 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf new file mode 100644 index 0000000000..6b507508b1 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.conf | |||
@@ -0,0 +1,8 @@ | |||
1 | # Defaults for racoon service | ||
2 | # sourced by racoon.service | ||
3 | # installed at /etc/default/racoon by the maintainer scripts | ||
4 | # | ||
5 | # This is a POSIX shell fragment | ||
6 | # | ||
7 | # Arguments to pass to racoon | ||
8 | RACOON_ARGS="" | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service new file mode 100644 index 0000000000..a10e770279 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Racoon IKEv1 key management daemon for IPSEC | ||
3 | After=syslog.target network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | EnvironmentFile=-@SYSCONFDIR@/default/racoon | ||
8 | ExecStart=@SBINDIR@/racoon $RACOON_ARGS | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
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 7519d8376b..9704b138c7 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 | |||
16 | file://glibc-2.20.patch \ | 16 | file://glibc-2.20.patch \ |
17 | file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \ | 17 | file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \ |
18 | file://racoon.conf.sample \ | 18 | file://racoon.conf.sample \ |
19 | file://racoon.conf \ | ||
20 | file://racoon.service \ | ||
19 | " | 21 | " |
20 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" | 22 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" |
21 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" | 23 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" |
22 | 24 | ||
23 | inherit autotools | 25 | inherit autotools systemd |
24 | 26 | ||
25 | # Options: | 27 | # Options: |
26 | # --enable-adminport enable admin port | 28 | # --enable-adminport enable admin port |
@@ -68,4 +70,15 @@ PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,l | |||
68 | do_install_append() { | 70 | do_install_append() { |
69 | install -d ${D}${sysconfdir}/racoon | 71 | install -d ${D}${sysconfdir}/racoon |
70 | install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf | 72 | install -m 0644 ${WORKDIR}/racoon.conf.sample ${D}${sysconfdir}/racoon/racoon.conf |
73 | |||
74 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
75 | install -d ${D}${systemd_unitdir}/system | ||
76 | install -m 0644 ${WORKDIR}/racoon.service ${D}${systemd_unitdir}/system | ||
77 | |||
78 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/racoon.service | ||
79 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/racoon.service | ||
80 | |||
81 | install -d ${D}${sysconfdir}/default/ | ||
82 | install -m 0644 ${WORKDIR}/racoon.conf ${D}${sysconfdir}/default/racoon | ||
83 | fi | ||
71 | } | 84 | } |