From 7bdfb3173f3850ab29a140b8ff53141cc6a71ca0 Mon Sep 17 00:00:00 2001 From: sherlock2010 <15151851377@163.com> Date: Wed, 28 Aug 2024 10:42:45 +0000 Subject: [PATCH] fix broken symbolic link after package remove (cherry picked from commit e8260ce04a3c941243acb87f058d66ac9ecf3ff7) --- firewalld.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/firewalld.spec b/firewalld.spec index 18ca8ae..50eb532 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -1,6 +1,6 @@ Name: firewalld Version: 1.2.6 -Release: 6 +Release: 7 Summary: A firewall daemon with D-Bus interface providing a dynamic firewall License: GPLv2+ URL: http://www.firewalld.org @@ -125,6 +125,11 @@ dd if=/dev/zero of=$RPM_BUILD_ROOT/%{_datadir}/firewalld/firewalld-tmp-mmap bs=4 %postun %systemd_postun_with_restart firewalld.service +if [ $1 -eq 0 ]; then + if [ -L %{_sysconfdir}/firewalld/firewalld.conf ] && [ ! -e %{_sysconfdir}/firewalld/firewalld.conf ]; then + rm -f %{_sysconfdir}/firewalld/firewalld.conf + fi +fi %posttrans # If we don't yet have a symlink or existing file for firewalld.conf, @@ -244,6 +249,12 @@ sed -i "s/CleanupModulesOnExit=no/CleanupModulesOnExit=yes/g" %{_sysconfdir}/fir %{_datadir}/firewalld/testsuite/python/firewalld_test.py %changelog +* Wed Aug 28 2024 zhouyihang - 1.2.6-7 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix broken symbolic link after package remove + * Thu Jul 11 2024 zhouyihang - 1.2.6-6 - Type:requirement - ID:NA -- Gitee