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