Merge branch 'persist-journal-default' into 'main'

tier-1: Enable persistent journal by default

See merge request CentOS/cloud/sagano!23
This commit is contained in:
Colin Walters 2023-09-21 21:11:43 +00:00
commit 204c8057d3
2 changed files with 14 additions and 0 deletions

View File

@ -7,6 +7,7 @@ include:
- system-configuration.yaml - system-configuration.yaml
- user-experience.yaml - user-experience.yaml
- fwupd.yaml - fwupd.yaml
- persistent-journal.yaml
packages: packages:
# Include and set the default editor # Include and set the default editor

View File

@ -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