summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2015-03-05 18:11:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-10 10:47:51 +0000
commite75c95ceca34879698b1ea229a2101dc1ccc12fc (patch)
treee9c7a675f8b4d0f98af37c2ab16a00dfb706d650 /meta
parentd7fe8b46a5e3fa0b3bac33a25bc3845c39f443f3 (diff)
downloadpoky-e75c95ceca34879698b1ea229a2101dc1ccc12fc.tar.gz
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 <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/journald-volatile.conf6
-rw-r--r--meta/recipes-core/systemd/systemd_219.bb2
2 files changed, 8 insertions, 0 deletions
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 @@
1# If /var/volatile is a mount point then make sure to mount it before
2# the journal starts. This is because base-files creates a symlink
3# /var/log -> /var/volatile/log. And if the journal starts before the mount
4# happens, the journal will appear empty until restarted.
5[Unit]
6After=var-volatile.mount
diff --git a/meta/recipes-core/systemd/systemd_219.bb b/meta/recipes-core/systemd/systemd_219.bb
index 5f58f409f4..d5eed08f1f 100644
--- a/meta/recipes-core/systemd/systemd_219.bb
+++ b/meta/recipes-core/systemd/systemd_219.bb
@@ -48,6 +48,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
48 file://00-create-volatile.conf \ 48 file://00-create-volatile.conf \
49 file://init \ 49 file://init \
50 file://run-ptest \ 50 file://run-ptest \
51 file://journald-volatile.conf \
51 " 52 "
52 53
53S = "${WORKDIR}/git" 54S = "${WORKDIR}/git"
@@ -144,6 +145,7 @@ do_install() {
144 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ 145 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
145 146
146 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ 147 install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
148 install -D -m 0644 ${WORKDIR}/journald-volatile.conf ${D}${systemd_unitdir}/system/systemd-journald.service.d/journald-volatile.conf
147 149
148 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then 150 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
149 install -d ${D}${sysconfdir}/init.d 151 install -d ${D}${sysconfdir}/init.d