Blame 0072-systemd-ensure-journal-is-volatile.patch

Harald Hoyer b38677
From 5dea430e087ec7749080547a6a6fe5b152f665ef Mon Sep 17 00:00:00 2001
Harald Hoyer b38677
From: Michael Chapman <mike@very.puzzling.org>
Harald Hoyer b38677
Date: Wed, 4 May 2016 10:49:56 +1000
Harald Hoyer b38677
Subject: [PATCH] systemd: ensure journal is volatile
Harald Hoyer b38677
Harald Hoyer b38677
If journald.conf already contains Storage=persistent, journald will
Harald Hoyer b38677
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
Harald Hoyer b38677
after switching root. We want to make sure early boot logs are written
Harald Hoyer b38677
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
Harald Hoyer b38677
switching root.
Harald Hoyer b38677
---
Harald Hoyer b38677
 modules.d/00systemd/module-setup.sh | 3 ++-
Harald Hoyer b38677
 1 file changed, 2 insertions(+), 1 deletion(-)
Harald Hoyer b38677
Harald Hoyer b38677
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
Harald Hoyer b38677
index deb5e06..951a5be 100755
Harald Hoyer b38677
--- a/modules.d/00systemd/module-setup.sh
Harald Hoyer b38677
+++ b/modules.d/00systemd/module-setup.sh
Harald Hoyer b38677
@@ -210,9 +210,10 @@ install() {
Harald Hoyer b38677
     done
Harald Hoyer b38677
 
Harald Hoyer b38677
     mkdir -p "$initdir/etc/systemd"
Harald Hoyer b38677
-    # turn off RateLimit for journal
Harald Hoyer b38677
+    # We must use a volatile journal, and we don't want rate-limiting
Harald Hoyer b38677
     {
Harald Hoyer b38677
         echo "[Journal]"
Harald Hoyer b38677
+        echo "Storage=volatile"
Harald Hoyer b38677
         echo "RateLimitInterval=0"
Harald Hoyer b38677
         echo "RateLimitBurst=0"
Harald Hoyer b38677
     } >> "$initdir/etc/systemd/journald.conf"