<p dir="ltr"><br>
On Mar 5, 2015 6:13 PM, &quot;Randy Witt&quot; &lt;<a href="mailto:randy.e.witt@linux.intel.com">randy.e.witt@linux.intel.com</a>&gt; wrote:<br>
&gt;<br>
&gt; systemd by default tries to write the journal to /var/log/journal.<br>
&gt; But base-files has a symlink /var/log -&gt; /var/volatile/log. And<br>
&gt; /var/volatile is a tmpfs mount in /etc/fstab.<br>
&gt;<br>
&gt; If the journal service started before /var/volatile was mounted (which<br>
&gt; was the typical scenario) then the journal would appear empty since<br>
&gt; the old location was mounted over.<br>
&gt;<br>
&gt; This change fixes the problem by ensuring that the journal doesn&#39;t start<br>
&gt; until after the mount happens.<br>
&gt;</p>
<p dir="ltr">What happens if folks have a different fstab then default? Will it still  work </p>
<p dir="ltr">&gt; [Yocto #7388]<br>
&gt;<br>
&gt; Signed-off-by: Randy Witt &lt;<a href="mailto:randy.e.witt@linux.intel.com">randy.e.witt@linux.intel.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/recipes-core/systemd/systemd/journald-volatile.conf | 6 ++++++<br>
&gt;  meta/recipes-core/systemd/<a href="http://systemd_219.bb">systemd_219.bb</a>                 | 2 ++<br>
&gt;  2 files changed, 8 insertions(+)<br>
&gt;  create mode 100644 meta/recipes-core/systemd/systemd/journald-volatile.conf<br>
&gt;<br>
&gt; diff --git a/meta/recipes-core/systemd/systemd/journald-volatile.conf b/meta/recipes-core/systemd/systemd/journald-volatile.conf<br>
&gt; new file mode 100644<br>
&gt; index 0000000..b11e160<br>
&gt; --- /dev/null<br>
&gt; +++ b/meta/recipes-core/systemd/systemd/journald-volatile.conf<br>
&gt; @@ -0,0 +1,6 @@<br>
&gt; +# If /var/volatile is a mount point then make sure to mount it before<br>
&gt; +# the journal starts. This is because base-files creates a symlink<br>
&gt; +# /var/log -&gt; /var/volatile/log. And if the journal starts before the mount<br>
&gt; +# happens, the journal will appear empty until restarted.<br>
&gt; +[Unit]<br>
&gt; +After=var-volatile.mount<br>
&gt; diff --git a/meta/recipes-core/systemd/<a href="http://systemd_219.bb">systemd_219.bb</a> b/meta/recipes-core/systemd/<a href="http://systemd_219.bb">systemd_219.bb</a><br>
&gt; index 3c4b6cf..2be66af 100644<br>
&gt; --- a/meta/recipes-core/systemd/<a href="http://systemd_219.bb">systemd_219.bb</a><br>
&gt; +++ b/meta/recipes-core/systemd/<a href="http://systemd_219.bb">systemd_219.bb</a><br>
&gt; @@ -48,6 +48,7 @@ SRC_URI = &quot;git://<a href="http://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=">anongit.freedesktop.org/systemd/systemd;branch=master;protocol=</a><br>
&gt;             file://00-create-volatile.conf \<br>
&gt;             file://init \<br>
&gt;             file://run-ptest \<br>
&gt; +           file://journald-volatile.conf \<br>
&gt;            &quot;<br>
&gt;<br>
&gt;  S = &quot;${WORKDIR}/git&quot;<br>
&gt; @@ -143,6 +144,7 @@ do_install() {<br>
&gt;         install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/<br>
&gt;<br>
&gt;         install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/<br>
&gt; +       install -D -m 0644 ${WORKDIR}/journald-volatile.conf ${D}${systemd_unitdir}/system/systemd-journald.service.d/journald-volatile.conf<br>
&gt;<br>
&gt;         if ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;,&#39;sysvinit&#39;,&#39;true&#39;,&#39;false&#39;,d)}; then<br>
&gt;                 install -d ${D}${sysconfdir}/init.d<br>
&gt; --<br>
&gt; 1.9.3<br>
&gt;<br>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</p>