summaryrefslogtreecommitdiff
path: root/poky
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-07 22:10:36 +0300
committerPatrick Williams <patrick@stwcx.xyz>2024-03-09 20:14:31 +0300
commit4564a786d39fa7f8f3f473a63543ea2f55d23c4c (patch)
tree76992f29874f6e128c287f955030d59ca7190627 /poky
parentd23fe061d82e27f8e43d74261e066997be836bc8 (diff)
downloadopenbmc-4564a786d39fa7f8f3f473a63543ea2f55d23c4c.tar.xz
systemd: Check for directory before chmod'ing it
da9db878a15 systemd: fix dead link /var/log/README add -Dcreate-log-dirs=false which means journal dir will not be generated regardless of VOLATILE_LOG_DIR value if a distro decided to set VOLATILE_LOG_DIR=no this code path will be executes and the directory being operated upon wont exist ending in do_install errors chown: cannot access '/mnt/b/yoe/master/build/tmp/work/riscv64-yoe-linux/systemd/255.4/image/var/log/journal': No such file or directory Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from openembedded-core. Change-Id: Ib22e7522b28eed69fcec7e5e98351a47594b85d7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'poky')
-rw-r--r--poky/meta/recipes-core/systemd/systemd_255.4.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/poky/meta/recipes-core/systemd/systemd_255.4.bb b/poky/meta/recipes-core/systemd/systemd_255.4.bb
index d59ca30c12..bcef3e6b7a 100644
--- a/poky/meta/recipes-core/systemd/systemd_255.4.bb
+++ b/poky/meta/recipes-core/systemd/systemd_255.4.bb
@@ -306,7 +306,7 @@ do_install() {
# /var/log is typically a symbolic link to inside /var/volatile,
# which is expected to be empty.
rm -rf ${D}${localstatedir}/log
- else
+ elif [ -e ${D}${localstatedir}/log/journal ]; then
chown root:systemd-journal ${D}${localstatedir}/log/journal
# journal-remote creates this at start