From b54d1636f0a953db087842527e1f33f785fee304 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 10 Jan 2019 09:45:24 +0100 Subject: [PATCH 1/3] systemd: Remove `/var/log/journal` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If `/var/log/journal` is present, systemd-journald flushes the log to the disk, which we do not want yet, as we still use syslog. Therefore, remove the directory. We probably had manually deleted it on all systems with systemd 237, and didn’t update the bee file accordingly, so that the logs were kept when updating to systemd 239. --- systemd.be0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemd.be0 b/systemd.be0 index dc791a7be..7e94c4b69 100755 --- a/systemd.be0 +++ b/systemd.be0 @@ -98,6 +98,9 @@ mee_install_post() { rm -rv ${D}/etc/systemd/system/dbus-org.freedesktop.network1.service rm -rv ${D}/etc/systemd/system/multi-user.target.wants/systemd-networkd.service rm -rv ${D}/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service + + # Remove directory to disable persistent storage of logs + rm -rv ${D}/var/log/journal } ############################################################################### From 3920409c4a6042644205bc66f46f5ffc254d8321 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Tue, 15 Jan 2019 16:10:55 +0100 Subject: [PATCH 2/3] systemd: Store journal log data only in memory From `man journald.conf`: > Storage= > Controls where to store journal data. One of "volatile", > "persistent", "auto" and "none". If "volatile", journal log data > will be stored only in memory, i.e. below the /run/log/journal > hierarchy (which is created if needed). If "persistent", data will > be stored preferably on disk, i.e. below the /var/log/journal > hierarchy (which is created if needed), with a fallback to > /run/log/journal (which is created if needed), during early boot > and if the disk is not writable. "auto" is similar to > "persistent" but the directory /var/log/journal is not created if > needed, so that its existence controls where log data goes. > "none" turns off all storage, all log data received will be > dropped. Forwarding to other targets, such as the console, the > kernel log buffer, or a syslog socket will still work however. > Defaults to "auto". --- systemd.be0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemd.be0 b/systemd.be0 index 7e94c4b69..e99dd4aaa 100755 --- a/systemd.be0 +++ b/systemd.be0 @@ -101,6 +101,9 @@ mee_install_post() { # Remove directory to disable persistent storage of logs rm -rv ${D}/var/log/journal + + # Explicitly configure volatile storage of logs + start_cmd sed -i 's/^#Storage=auto/Storage=volatile/' ${D}/etc/systemd/journald.conf } ############################################################################### From f4ea0f0b66e6bce780da4340d90a26178bf7cf34 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 10 Jan 2019 09:48:10 +0100 Subject: [PATCH 3/3] systemd: Increment revision to 2 --- systemd.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd.be0 b/systemd.be0 index e99dd4aaa..6ec328910 100755 --- a/systemd.be0 +++ b/systemd.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION systemd-239-1 +# BEE_VERSION systemd-239-2 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.)