From e75c95ceca34879698b1ea229a2101dc1ccc12fc Mon Sep 17 00:00:00 2001 From: Randy Witt Date: Thu, 5 Mar 2015 18:11:46 -0800 Subject: systemd: Fix the problem of an empty journal on boot systemd by default tries to write the journal to /var/log/journal. But base-files has a symlink /var/log -> /var/volatile/log. And /var/volatile is a tmpfs mount in /etc/fstab. If the journal service started before /var/volatile was mounted (which was the typical scenario) then the journal would appear empty since the old location was mounted over. This change fixes the problem by ensuring that the journal doesn't start until after the mount happens. [Yocto #7388] (From OE-Core rev: 17e8595af2041cfd63adf73b344f7ccad3db7e01) Signed-off-by: Randy Witt Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-core/systemd/systemd/journald-volatile.conf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/journald-volatile.conf (limited to 'meta/recipes-core/systemd/systemd') diff --git a/meta/recipes-core/systemd/systemd/journald-volatile.conf b/meta/recipes-core/systemd/systemd/journald-volatile.conf new file mode 100644 index 0000000000..b11e1606b5 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/journald-volatile.conf @@ -0,0 +1,6 @@ +# If /var/volatile is a mount point then make sure to mount it before +# the journal starts. This is because base-files creates a symlink +# /var/log -> /var/volatile/log. And if the journal starts before the mount +# happens, the journal will appear empty until restarted. +[Unit] +After=var-volatile.mount -- cgit v1.2.3-54-g00ecf