]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: ensure journal is volatile 126/head
authorMichael Chapman <mike@very.puzzling.org>
Wed, 4 May 2016 00:49:56 +0000 (10:49 +1000)
committerMichael Chapman <mike@very.puzzling.org>
Wed, 4 May 2016 00:49:56 +0000 (10:49 +1000)
If journald.conf already contains Storage=persistent, journald will
write to /var/log/journal/, which ends up at /run/initramfs/log/journal/
after switching root. We want to make sure early boot logs are written
to /run/log/journal/ so they can be flushed to /var/log/journal/ after
switching root.

modules.d/00systemd/module-setup.sh

index deb5e06c023ae5bbfe4a5752f20faf3581f514ce..951a5be9027fbf4761ff4b1e2ee7a8f28b8c8c65 100755 (executable)
@@ -210,9 +210,10 @@ install() {
     done
 
     mkdir -p "$initdir/etc/systemd"
-    # turn off RateLimit for journal
+    # We must use a volatile journal, and we don't want rate-limiting
     {
         echo "[Journal]"
+        echo "Storage=volatile"
         echo "RateLimitInterval=0"
         echo "RateLimitBurst=0"
     } >> "$initdir/etc/systemd/journald.conf"