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