diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-24 14:53:39 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-09-26 05:42:53 +0200 |
commit | da6908e1d30e214c99ea24ab5ce42b85934447e4 (patch) | |
tree | 3c65cca21c7c5301d0b73f57e90abcf47665771e /meta-networking/recipes-daemons | |
parent | 061e952c67e556142dc7e2cbaf3c803f84ac45ad (diff) | |
download | meta-openembedded-da6908e1d30e214c99ea24ab5ce42b85934447e4.tar.gz |
radvd: add systemd service file
Add systemd service for for radvd.
The unit is disabled by default, just as Fedora20 does.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/radvd/files/radvd.service | 14 | ||||
-rw-r--r-- | meta-networking/recipes-daemons/radvd/radvd.inc | 14 |
2 files changed, 27 insertions, 1 deletions
diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.service b/meta-networking/recipes-daemons/radvd/files/radvd.service new file mode 100644 index 000000000..3aac7b27d --- /dev/null +++ b/meta-networking/recipes-daemons/radvd/files/radvd.service | |||
@@ -0,0 +1,14 @@ | |||
1 | [Unit] | ||
2 | Description=Router advertisement daemon for IPv6 | ||
3 | After=network.target | ||
4 | ConditionPathExists=@SYSCONFDIR@/radvd.conf | ||
5 | |||
6 | [Service] | ||
7 | Type=forking | ||
8 | PIDFile=/var/run/radvd/radvd.pid | ||
9 | EnvironmentFile=-@SYSCONFDIR@/default/radvd | ||
10 | ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/radvd | ||
11 | ExecStart=@SBINDIR@/radvd $OPTIONS | ||
12 | |||
13 | [Install] | ||
14 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-networking/recipes-daemons/radvd/radvd.inc index ededf9ad2..85d1a85b1 100644 --- a/meta-networking/recipes-daemons/radvd/radvd.inc +++ b/meta-networking/recipes-daemons/radvd/radvd.inc | |||
@@ -16,9 +16,13 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db" | |||
16 | 16 | ||
17 | SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \ | 17 | SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \ |
18 | file://radvd.init \ | 18 | file://radvd.init \ |
19 | file://radvd.service \ | ||
19 | file://volatiles.03_radvd" | 20 | file://volatiles.03_radvd" |
20 | 21 | ||
21 | inherit autotools update-rc.d useradd pkgconfig | 22 | inherit autotools update-rc.d useradd pkgconfig systemd |
23 | |||
24 | SYSTEMD_SERVICE_${PN} = "radvd.service" | ||
25 | SYSTEMD_AUTO_ENABLE = "disable" | ||
22 | 26 | ||
23 | do_install_append () { | 27 | do_install_append () { |
24 | install -m 0755 -d ${D}${sysconfdir}/init.d \ | 28 | install -m 0755 -d ${D}${sysconfdir}/init.d \ |
@@ -32,6 +36,14 @@ do_install_append () { | |||
32 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd | 36 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd |
33 | 37 | ||
34 | install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd | 38 | install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd |
39 | |||
40 | # Install systemd service files | ||
41 | install -d ${D}${systemd_unitdir}/system | ||
42 | install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system | ||
43 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \ | ||
44 | -e 's#@SBINDIR@#${sbindir}#g' \ | ||
45 | -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service | ||
46 | |||
35 | # Documentation | 47 | # Documentation |
36 | for i in radvd.conf.example README; do \ | 48 | for i in radvd.conf.example README; do \ |
37 | install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ | 49 | install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ |