summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-10-29 23:29:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-01 10:41:18 +0000
commit8aa69972a6ef61e000a8a87fe08dabb44a095a4f (patch)
tree738cd460837fec4d5797992d689c3428c6c87792
parent671aa4424ae18f5a40d8770de80115004221ae47 (diff)
downloadpoky-8aa69972a6ef61e000a8a87fe08dabb44a095a4f.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. (From OE-Core rev: 73356f6d9d3881cf8ebde91a84758b25c63432cf) 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.bb15
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() {
270 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_system_unitdir}d-sysv-install 270 install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_system_unitdir}d-sysv-install
271 fi 271 fi
272 272
273 chown root:systemd-journal ${D}/${localstatedir}/log/journal 273 if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then
274 274 # /var/log is typically a symbolic link to inside /var/volatile,
275 # Delete journal README, as log can be symlinked inside volatile. 275 # which is expected to be empty.
276 rm -f ${D}/${localstatedir}/log/README 276 rm -rf ${D}${localstatedir}/log
277 else
278 chown root:systemd-journal ${D}${localstatedir}/log/journal
277 279
278 # journal-remote creates this at start 280 # journal-remote creates this at start
279 rm -rf ${D}/${localstatedir}/log/journal/remote 281 rm -rf ${D}${localstatedir}/log/journal/remote
282 fi
280 283
281 install -d ${D}${systemd_system_unitdir}/graphical.target.wants 284 install -d ${D}${systemd_system_unitdir}/graphical.target.wants
282 install -d ${D}${systemd_system_unitdir}/multi-user.target.wants 285 install -d ${D}${systemd_system_unitdir}/multi-user.target.wants