Patchwork [meta-networking,2/5] radvd: fix pkg_postinst

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Oct. 31, 2013, 6:29 a.m.
Message ID <1383200986-18674-2-git-send-email-Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/60857/
State Accepted, archived
Commit 1ec32c102f48f26f18b4fa4b9ede064928e8a01e
Headers show

Comments

Qi.Chen@windriver.com - Oct. 31, 2013, 6:29 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

`/etc/init.d/populate-volatile.sh update' only needs to run in case
of an on-target installation. And it should have a prerequisite that
the script is executable.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta-networking/recipes-daemons/radvd/radvd.inc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-networking/recipes-daemons/radvd/radvd.inc
index 89669f7..f314fee 100644
--- a/meta-networking/recipes-daemons/radvd/radvd.inc
+++ b/meta-networking/recipes-daemons/radvd/radvd.inc
@@ -38,5 +38,7 @@  USERADD_PACKAGES = "${PN}"
 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd"
 
 pkg_postinst_${PN} () {
-    ${sysconfdir}/init.d/populate-volatile.sh update
+    if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then
+	/etc/init.d/populate-volatile.sh update
+    fi
 }