diff options
author | Chong Lu <Chong.Lu@windriver.com> | 2014-09-09 13:32:36 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-11-04 10:27:09 +0000 |
commit | a60af9ac74ad8eea704b45fbf5054fecfe681288 (patch) | |
tree | 8f1d9c8102603b73470dc88a8a3e42b809440848 | |
parent | 0d339e21db620dec66cf311c05b5844bb4657876 (diff) | |
download | poky-a60af9ac74ad8eea704b45fbf5054fecfe681288.tar.gz |
xinetd: add systemd unit file
Add systemd unit file for xinetd.
(From OE-Core rev: aa0a1cbc92a4d586377cb9e9827ee8b90749c364)
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/xinetd/xinetd/xinetd.service | 13 | ||||
-rw-r--r-- | meta/recipes-extended/xinetd/xinetd_2.3.15.bb | 12 |
2 files changed, 24 insertions, 1 deletions
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.service b/meta/recipes-extended/xinetd/xinetd/xinetd.service new file mode 100644 index 0000000000..d5fdc5bc29 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.service | |||
@@ -0,0 +1,13 @@ | |||
1 | [Unit] | ||
2 | Description=Xinetd A Powerful Replacement For Inetd | ||
3 | After=syslog.target network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/var/run/xinetd.pid | ||
8 | EnvironmentFile=-/etc/sysconfig/xinetd | ||
9 | ExecStart=@SBINDIR@/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS" | ||
10 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | ||
11 | |||
12 | [Install] | ||
13 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb index 1928949e94..288186e1ba 100644 --- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb +++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb | |||
@@ -17,12 +17,15 @@ SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \ | |||
17 | file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ | 17 | file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ |
18 | file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ | 18 | file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ |
19 | file://xinetd-CVE-2013-4342.patch \ | 19 | file://xinetd-CVE-2013-4342.patch \ |
20 | file://xinetd.service \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c" | 23 | SRC_URI[md5sum] = "77358478fd58efa6366accae99b8b04c" |
23 | SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3" | 24 | SRC_URI[sha256sum] = "bf4e060411c75605e4dcbdf2ac57c6bd9e1904470a2f91e01ba31b50a80a5be3" |
24 | 25 | ||
25 | inherit autotools update-rc.d | 26 | inherit autotools update-rc.d systemd |
27 | |||
28 | SYSTEMD_SERVICE_${PN} = "xinetd.service" | ||
26 | 29 | ||
27 | INITSCRIPT_NAME = "xinetd" | 30 | INITSCRIPT_NAME = "xinetd" |
28 | INITSCRIPT_PARAMS = "defaults" | 31 | INITSCRIPT_PARAMS = "defaults" |
@@ -52,6 +55,13 @@ do_install() { | |||
52 | install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" | 55 | install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" |
53 | install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" | 56 | install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" |
54 | install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" | 57 | install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" |
58 | |||
59 | # Install systemd unit files | ||
60 | install -d ${D}${systemd_unitdir}/system | ||
61 | install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system | ||
62 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
63 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
64 | ${D}${systemd_unitdir}/system/xinetd.service | ||
55 | } | 65 | } |
56 | 66 | ||
57 | CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" | 67 | CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" |