From: Changqing Li <changqing...@windriver.com> * update dirs1777 so that only create /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes, create /var/tmp when VOLATILE_TMP_DIR set to no
* update volatiles so that only symlink /var/tmp to /var/volatiles/tmp when VOLATILE_TMP_DIR set to yes * mount /tmp as tmpfs fs when VOLATILE_TMP_DIR set to no and init manager is sysvinit Signed-off-by: Changqing Li <changqing...@windriver.com> --- meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..01d076369d 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -30,7 +30,7 @@ S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" docdir:append = "/${P}" -dirs1777 = "/tmp ${localstatedir}/volatile/tmp" +dirs1777 = "/tmp ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}tmp" dirs2775 = "" dirs555 = "/sys /proc" dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ @@ -54,7 +54,8 @@ dirs755-lsb = "/srv \ ${prefix}/lib/locale" dirs2775-lsb = "/var/mail" -volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" +volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} \ + ${@'tmp' if oe.types.boolean('${VOLATILE_TMP_DIR}') else ''}" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -122,6 +123,9 @@ do_install () { fi install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + if [ ${@ oe.types.boolean('${VOLATILE_TMP_DIR}') } = False ] && ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)} ;then + echo "tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=50%,nr_inodes=1m 0 0" >> ${D}${sysconfdir}/fstab + fi install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#192024): https://lists.openembedded.org/g/openembedded-core/message/192024 Mute This Topic: https://lists.openembedded.org/mt/103052519/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-