[oe] [PATCH] radvd: fix daemon start-up
Qi.Chen at windriver.com
Qi.Chen at windriver.com
Fri Oct 17 06:38:44 UTC 2014
From: Chen Qi <Qi.Chen at windriver.com>
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>
---
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(-)
create mode 100644 meta-networking/recipes-daemons/radvd/files/radvd.default
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; \
--
1.9.1
More information about the Openembedded-devel
mailing list