From e943e1cabbccbea8140c72fba8600c5ad4d02c53 Mon Sep 17 00:00:00 2001 From: sherlock2010 <15151851377@163.com> Date: Tue, 27 Aug 2024 02:31:37 +0000 Subject: [PATCH] fix broken symbolic link after package remove --- firewalld.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/firewalld.spec b/firewalld.spec index fe90ecb..a9e67a0 100644 --- a/firewalld.spec +++ b/firewalld.spec @@ -1,6 +1,6 @@ Name: firewalld Version: 0.6.6 -Release: 8 +Release: 9 Summary: A firewall daemon with D-Bus interface providing a dynamic firewall License: GPLv2+ URL: http://www.firewalld.org @@ -105,6 +105,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, @@ -196,6 +201,12 @@ fi %changelog +* Tue Aug 27 2024 zhouyihang - 0.6.6-9 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix broken symbolic link after package remove + * Fri Jul 05 2024 zhouyihang - 0.6.6-8 - Type:bugfix - ID:NA -- Gitee