diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-10-29 23:29:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-01 10:41:15 +0000 |
commit | 73356f6d9d3881cf8ebde91a84758b25c63432cf (patch) | |
tree | 462ed64473f84ea704aebbb9888e8b8e15e9fe2e | |
parent | caf0457ef1e081eed177ade5e727dd7aa3f41bdd (diff) | |
download | openembedded-core-contrib-73356f6d9d3881cf8ebde91a84758b25c63432cf.tar.gz |
systemd: Do not install anything in /var/volatile
/var/log is typically a symbolic link to inside /var/volatile, which
is expected to be empty. Check ${VOLATILE_LOG_DIR} to see if it is ok
to install /var/log.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/systemd/systemd_249.5.bb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/recipes-core/systemd/systemd_249.5.bb b/meta/recipes-core/systemd/systemd_249.5.bb index d87f54bf16..c0c1f9bcfc 100644 --- a/meta/recipes-core/systemd/systemd_249.5.bb +++ b/meta/recipes-core/systemd/systemd_249.5.bb @@ -270,13 +270,16 @@ do_install() { install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_system_unitdir}d-sysv-install fi - chown root:systemd-journal ${D}/${localstatedir}/log/journal - - # Delete journal README, as log can be symlinked inside volatile. - rm -f ${D}/${localstatedir}/log/README + 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. + rm -rf ${D}${localstatedir}/log + else + chown root:systemd-journal ${D}${localstatedir}/log/journal - # journal-remote creates this at start - rm -rf ${D}/${localstatedir}/log/journal/remote + # journal-remote creates this at start + rm -rf ${D}${localstatedir}/log/journal/remote + fi install -d ${D}${systemd_system_unitdir}/graphical.target.wants install -d ${D}${systemd_system_unitdir}/multi-user.target.wants |