[oe] [meta-networking][PATCH] vsftpd: install volatiles file based on init system

Joe MacDonald joe at deserted.net
Thu Dec 12 19:00:57 UTC 2013


The sysvinit populate-volatile.sh scans for volatiles in
/etc/default/volatiles.  systemd expects the same format files to live in
/etc/tmpfiles.d.  Depedning on the DISTRO_FEATURE list, install vsftpd's
volatiles file to the expected location.  While we're here, drop the
creation of the empty ${localstatedir}/run/ hierarchy since they should be
created by the volatiles processing.

Signed-off-by: Joe MacDonald <joe at deserted.net>
---
 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
index 0698a63..9d82fd7 100644
--- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
+++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
@@ -59,8 +59,13 @@ do_install() {
     install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
     install -d ${D}${sysconfdir}/init.d/
     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
-    install -d ${D}/${sysconfdir}/default/volatiles
-    install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+    if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}/${sysconfdir}/tmpfiles.d
+        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd
+    else
+        install -d ${D}/${sysconfdir}/default/volatiles
+        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+    fi
 
     install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
     install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
@@ -70,7 +75,6 @@ do_install() {
         sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd
         sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd
     fi
-    install -d ${D}${localstatedir}/run/vsftpd/empty
 }
 
 INITSCRIPT_PACKAGES = "${PN}"
-- 
1.7.10.4




More information about the Openembedded-devel mailing list