From 009c64d6a2bfc60153d1c418f384cf527bccb2a0 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Nov 05 2024 13:15:41 +0000 Subject: Use %systemd_preun in systemd-resolved With that, systemd-resolved.service is not only disabled but also stopped on package uninstall. ... (rhbz#2305391) --- diff --git a/systemd.spec b/systemd.spec index b06d182..22bc752 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1185,10 +1185,8 @@ fi %systemd_post systemd-resolved.service %preun resolved +%systemd_preun systemd-resolved.service if [ $1 -eq 0 ] ; then - systemctl disable --quiet \ - systemd-resolved.service \ - >/dev/null || : if [ -L /etc/resolv.conf ] && \ realpath /etc/resolv.conf | grep ^/run/systemd/resolve/; then rm -f /etc/resolv.conf # no longer useful