From b764a2387b6d84533a071fb656979c7f734ac38d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jun 16 2021 20:37:47 +0000 Subject: resolved: fix skipping of scriptlet on upgrades We don't want to preset and we don't want to create the symlink either. --- diff --git a/systemd.spec b/systemd.spec index 0a489ad..10dbc3c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -916,12 +916,16 @@ if [ $1 -eq 0 ] ; then fi %post resolved +[ $1 -gt 1 ] && exit 0 + # Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263 -if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-7].so &>/dev/null; then +if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd." -else - %systemd_post systemd-resolved.service + exit 0 fi + +%systemd_post systemd-resolved.service + # Create /etc/resolv.conf symlink. # We would also create it using tmpfiles, but let's do this here # too before NetworkManager gets a chance. (systemd-tmpfiles invocation above