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