From d6c5c14f3854c8b996a023099e3d01778a56844d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 21 Sep 2023 17:00:10 -0400 Subject: [PATCH] tier-1: Enable persistent journal by default The copies of this never stop! --- tier-1/manifest.yaml | 1 + tier-1/persistent-journal.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tier-1/persistent-journal.yaml diff --git a/tier-1/manifest.yaml b/tier-1/manifest.yaml index 5316cb0..9e892ac 100644 --- a/tier-1/manifest.yaml +++ b/tier-1/manifest.yaml @@ -7,6 +7,7 @@ include: - system-configuration.yaml - user-experience.yaml - fwupd.yaml + - persistent-journal.yaml packages: # Include and set the default editor diff --git a/tier-1/persistent-journal.yaml b/tier-1/persistent-journal.yaml new file mode 100644 index 0000000..8c77a6d --- /dev/null +++ b/tier-1/persistent-journal.yaml @@ -0,0 +1,13 @@ +# Taken from https://github.com/coreos/fedora-coreos-config/blob/aa4373201f415baff85701f7f96ab0583931af6c/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf#L5 +# Hardcode persistent journal by default. journald has this "auto" behaviour +# that only makes logs persistent if `/var/log/journal` exists, which it won't +# on first boot because `/var` isn't fully populated. We should be able to get +# rid of this once we move to sysusers and create the dir in the initrd. + +postprocess: + - | #!/bin/bash + mkdir -p /usr/lib/systemd/journald.conf.d/ + cat >/usr/lib/systemd/journald.conf.d/10-sagano-persistent.conf << EOF + [Journal] + Storage=persistent + EOF