]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: ensure journal is volatile
authorMichael Chapman <mike@very.puzzling.org>
Wed, 4 May 2016 00:49:56 +0000 (10:49 +1000)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Jun 2016 15:21:56 +0000 (17:21 +0200)
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.

(cherry picked from commit 5dea430e087ec7749080547a6a6fe5b152f665ef)

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

index 64b83a0e409f977fff76254fcb65666ccd6b09bb..10beadda580cc0b7b9cd48142687d868a5d85ce1 100755 (executable)
@@ -255,9 +255,10 @@ install() {
 
 
     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"