debian-bootc-base-images/standard/persistent-journal.yaml
Jonathan Lebon 2c6d03cfe3
manifests: consistently use set -xeuo pipefail in postprocess scripts
The `set -euo pipefail` shouldn't be controversial.

The `set -x` bit is more debatable because it makes
the output more verbose but I find it helpful right
now as I comb through all sorts of details as part of
https://github.com/coreos/fedora-coreos-tracker/issues/1861.

If we care about less verbose output, I'd prefer we keep `-x` but
switched to having rpm-ostree buffer postprocess output and only dump it
if it fails.
2025-05-26 14:41:11 -04:00

15 lines
724 B
YAML

# 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
set -xeuo pipefail
mkdir -p /usr/lib/systemd/journald.conf.d/
cat >/usr/lib/systemd/journald.conf.d/10-centos-bootc-persistent.conf << EOF
[Journal]
Storage=persistent
EOF