diff --git a/meta/recipes-core/systemd/systemd_256.bb b/meta/recipes-core/systemd/systemd_256.bb index 9bd59ef39f..3579c71891 100644 --- a/meta/recipes-core/systemd/systemd_256.bb +++ b/meta/recipes-core/systemd/systemd_256.bb @@ -314,9 +314,10 @@ do_install() { fi if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then - # /var/log is typically a symbolic link to inside /var/volatile, - # which is expected to be empty. + # base-files recipe provides /var/log which is a symlink to /var/volatile/log rm -rf ${D}${localstatedir}/log + printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "${localstatedir}" \ + "${localstatedir}" >>${D}${nonarch_libdir}/tmpfiles.d/00-create-volatile.conf elif [ -e ${D}${localstatedir}/log/journal ]; then chown root:systemd-journal ${D}${localstatedir}/log/journal