Reenable systemd-journald-audit.socket after upgrades

... (rhbz#2164594)

The socket exists and is enabled in the initrd. After switch-root, the system
goes into an infinite loop trying to stop the socket while incoming audit
messages trigger start jobs for the socket. This is a bug in the transaction
logic, that'll need to be fixed separately.

We need to preset the socket after the upgrade so that it remains enabled
by default. This should fix the boot issue, though it's not a complete fix,
because we actually want to allow people to disable the socket.

On initial install, the socket is covered by preset-all and gets enabled.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-01-26 11:14:15 +01:00
parent 58eb55671d
commit efa3d301b9

View File

@ -876,11 +876,17 @@ if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
systemctl start systemd-resolved.service &>/dev/null || :
fi
%triggerpostun -- systemd < 247.3-2
%triggerun -- systemd < 247.3-2
# This is for upgrades from previous versions before oomd-defaults is available.
systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
%triggerpostun -- systemd < 253~rc1-2
# This is for upgrades from previous versions where systemd-journald-audit.socket
# had a static enablement symlink.
# We use %%triggerpostun here because rpm doesn't allow a second %%triggerun with
# a different package version.
systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service}