post.sh: Update persistent journal workaround

Add a systemd configuration drop-in instead of modyfing the default
configuration file.

Imported from:
https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf
This commit is contained in:
Timothée Ravier 2022-01-21 11:29:47 +01:00
parent 635f72795a
commit c5edd168e1
1 changed files with 3 additions and 5 deletions

View File

@ -6,11 +6,9 @@
set -xeuo pipefail set -xeuo pipefail
# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295 # Work around https://bugzilla.redhat.com/show_bug.cgi?id=1265295
# Also note the create-new-then-rename dance for rofiles-fuse compat # From https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/systemd/journald.conf.d/10-coreos-persistent.conf
if ! grep -q '^Storage=persistent' /etc/systemd/journald.conf; then install -dm0755 /usr/lib/systemd/journald.conf.d/
(cat /etc/systemd/journald.conf && echo 'Storage=persistent') > /etc/systemd.journald.conf.new echo -e "[Journal]\nStorage=persistent" > /usr/lib/systemd/journald.conf.d/10-persistent.conf
mv /etc/systemd.journald.conf{.new,}
fi
# See: https://src.fedoraproject.org/rpms/glibc/pull-request/4 # See: https://src.fedoraproject.org/rpms/glibc/pull-request/4
# Basically that program handles deleting old shared library directories # Basically that program handles deleting old shared library directories