]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use a dropin for the journald snippet
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 31 Jan 2024 09:45:13 +0000 (10:45 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 31 Jan 2024 13:00:01 +0000 (13:00 +0000)
The original way of appending to /etc/systemd/journald.conf doesn't work
anymore, since we no longer ship the default configs in /etc/.

test/TEST-24-CRYPTSETUP/test.sh

index a9c3e05d006246a38b65cf5d00efba808e2549e7..cfb746a4dbe61d79ebfbd1d3abf308270a455183 100755 (executable)
@@ -189,9 +189,10 @@ test_create_image() {
 /dev/mapper/$DM_NAME    /var    ext4    defaults 0 1
 EOF
 
-    # Forward journal messages to the console, so we have something
-    # to investigate even if we fail to mount the encrypted /var
-    echo ForwardToConsole=yes >>"$initdir/etc/systemd/journald.conf"
+    # Forward journal messages to the console, so we have something to investigate even if we fail to mount
+    # the encrypted /var
+    mkdir "$initdir/etc/systemd/journald.conf.d/"
+    echo -ne "[Journal]\nForwardToConsole=yes\n" >"$initdir/etc/systemd/journald.conf.d/99-forward.conf"
 
     # If $INITRD wasn't provided explicitly, generate a custom one with dm-crypt
     # support