[oe-commits] Chen Qi : vsftpd: fix pkg_postinst

git at git.openembedded.org git at git.openembedded.org
Tue Sep 30 02:17:22 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: 0447d2fb6012766fd42c88268fdd5e43a688776d
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=0447d2fb6012766fd42c88268fdd5e43a688776d

Author: Chen Qi <Qi.Chen at windriver.com>
Date:   Sun Sep 28 15:54:04 2014 +0800

vsftpd: fix pkg_postinst

Fix pkg_postinst to not exit if "$D" is not empty.
Otherwise, postinsts from update-rc.d.bbclass would not run and the
symlinks under /etc/rc?.d/ would not be created.

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb
index a1c4ff4..07c73c5 100644
--- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb
+++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.2.bb
@@ -88,12 +88,11 @@ USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ftp --no-create-home -g ftp
 GROUPADD_PARAM_${PN} = "-r ftp"
 
 pkg_postinst_${PN}() {
-	if [ -n "$D" ]; then
-		exit 0
-	fi
+    if [ -z "$D" ]; then
 	if type systemd-tmpfiles >/dev/null; then
-		systemd-tmpfiles --create
+	    systemd-tmpfiles --create
 	elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
-		${sysconfdir}/init.d/populate-volatile.sh update
+	    ${sysconfdir}/init.d/populate-volatile.sh update
 	fi
+    fi
 }



More information about the Openembedded-commits mailing list