diff --git a/meta-lmp-base/recipes-core/base-files/base-files/tmpfiles.conf b/meta-lmp-base/recipes-core/base-files/base-files/tmpfiles.conf index 518745b7df..04311aa1bc 100644 --- a/meta-lmp-base/recipes-core/base-files/base-files/tmpfiles.conf +++ b/meta-lmp-base/recipes-core/base-files/base-files/tmpfiles.conf @@ -1,3 +1,4 @@ d /var/backups 0755 - - - d /var/lib/misc 0755 - - - d /var/local 0755 - - - +d ROOTHOME 0700 root root - diff --git a/meta-lmp-base/recipes-core/base-files/base-files_%.bbappend b/meta-lmp-base/recipes-core/base-files/base-files_%.bbappend index 1f8587be1e..2307a72d69 100644 --- a/meta-lmp-base/recipes-core/base-files/base-files_%.bbappend +++ b/meta-lmp-base/recipes-core/base-files/base-files_%.bbappend @@ -5,6 +5,7 @@ SRC_URI += "file://tmpfiles.conf" do_install:append () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -D -m 0644 ${WORKDIR}/tmpfiles.conf ${D}${nonarch_libdir}/tmpfiles.d/${PN}.conf + sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${nonarch_libdir}/tmpfiles.d/${PN}.conf ( # Remove /var stuff cd ${D}${localstatedir}; @@ -16,6 +17,10 @@ do_install:append () { rmdir -v ${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log; # symlinks rm -v run lock; + # Remove /home stuff + cd ${D} + roothomedir=$(echo ${ROOT_HOME} | sed 's#^/##') + rmdir -v --parents ${roothomedir}; ) fi }