From d6f958d468666c76ac444289f23384e8fb9ed928 Mon Sep 17 00:00:00 2001 From: xh Date: Tue, 30 Jul 2024 10:52:24 +0000 Subject: [PATCH] fix ebtables-restore --noflush failed when ebtables is uninstall (cherry picked from commit b5a24da296442cd15cd0f84c85255854b85a830c) --- ebtables.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ebtables.spec b/ebtables.spec index 949a0e4..a48aca6 100644 --- a/ebtables.spec +++ b/ebtables.spec @@ -1,7 +1,7 @@ Name: ebtables Version: 2.0.11 -Release: 11 +Release: 12 Summary: A filtering tool for a Linux-based bridging firewall License: GPLv2+ URL: http://ebtables.sourceforge.net/ @@ -90,6 +90,19 @@ fi if [ $1 -eq 0 ]; then %{_sbindir}/update-alternatives --remove \ ebtables %{_sbindir}/ebtables-legacy + if [ -e /usr/sbin/iptables-nft ]; then + pfx=%{_sbindir}/ebtables + manpfx=%{_mandir}/man8/ebtables + %{_sbindir}/update-alternatives --install \ + $pfx ebtables $pfx-nft 10 \ + --slave $pfx-save ebtables-save $pfx-nft-save \ + --slave $pfx-restore ebtables-restore $pfx-nft-restore \ + --slave $manpfx.8.gz ebtables-man $manpfx-nft.8.gz + systemctl status firewalld 2>/dev/null | grep -w "running" > /dev/null + if [ $? -eq 0 ];then + systemctl restart firewalld || : + fi + fi fi %files @@ -113,6 +126,12 @@ fi %doc %{_mandir}/man8/ebtables-legacy.8* %changelog +* Tue Jul 30 2024 xinghe - 2.0.11-12 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix ebtables-restore --noflush failed when ebtables is uninstall + * Wed Sep 20 2023 xinghe - 2.0.11-11 - Type:bugfix - ID:NA