[oe-commits] Chen Qi : radvd: fix daemon start-up
git at git.openembedded.org
git at git.openembedded.org
Mon Oct 27 11:56:53 UTC 2014
Module: meta-openembedded.git
Branch: master-next
Commit: 350139ba63fc1cf84d04c482a5407dfa8b724f63
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=350139ba63fc1cf84d04c482a5407dfa8b724f63
Author: Chen Qi <Qi.Chen at windriver.com>
Date: Fri Oct 17 15:05:55 2014 +0800
radvd: fix daemon start-up
1. Fix radvd.service to start daemon correctly.
2. Make the daemon run under 'radvd' user by default.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
---
meta-networking/recipes-daemons/radvd/files/radvd.default | 1 +
meta-networking/recipes-daemons/radvd/files/radvd.service | 5 +----
meta-networking/recipes-daemons/radvd/radvd.inc | 6 +++++-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.default b/meta-networking/recipes-daemons/radvd/files/radvd.default
new file mode 100644
index 0000000..7cb73c7
--- /dev/null
+++ b/meta-networking/recipes-daemons/radvd/files/radvd.default
@@ -0,0 +1 @@
+OPTIONS="-u radvd"
diff --git a/meta-networking/recipes-daemons/radvd/files/radvd.service b/meta-networking/recipes-daemons/radvd/files/radvd.service
index 3aac7b2..e60798a 100644
--- a/meta-networking/recipes-daemons/radvd/files/radvd.service
+++ b/meta-networking/recipes-daemons/radvd/files/radvd.service
@@ -4,11 +4,8 @@ After=network.target
ConditionPathExists=@SYSCONFDIR@/radvd.conf
[Service]
-Type=forking
-PIDFile=/var/run/radvd/radvd.pid
EnvironmentFile=- at SYSCONFDIR@/default/radvd
-ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/radvd
-ExecStart=@SBINDIR@/radvd $OPTIONS
+ExecStart=@SBINDIR@/radvd -n $OPTIONS
[Install]
WantedBy=multi-user.target
diff --git a/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-networking/recipes-daemons/radvd/radvd.inc
index 85d1a85..6b595b0 100644
--- a/meta-networking/recipes-daemons/radvd/radvd.inc
+++ b/meta-networking/recipes-daemons/radvd/radvd.inc
@@ -17,7 +17,8 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
file://radvd.init \
file://radvd.service \
- file://volatiles.03_radvd"
+ file://volatiles.03_radvd \
+ file://radvd.default"
inherit autotools update-rc.d useradd pkgconfig systemd
@@ -44,6 +45,9 @@ do_install_append () {
-e 's#@SBINDIR@#${sbindir}#g' \
-e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service
+ # Install default environment file
+ install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd
+
# Documentation
for i in radvd.conf.example README; do \
install -m 0644 ${S}/$i ${D}${docdir}/radvd; \
More information about the Openembedded-commits
mailing list