!78 [sync] PR-69: fix ebtables-restore --noflush failed when ebtables is uninstall

From: @openeuler-sync-bot 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
This commit is contained in:
openeuler-ci-bot 2024-07-31 02:58:55 +00:00 committed by Gitee
commit feb0d471ff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: ebtables Name: ebtables
Version: 2.0.11 Version: 2.0.11
Release: 11 Release: 12
Summary: A filtering tool for a Linux-based bridging firewall Summary: A filtering tool for a Linux-based bridging firewall
License: GPLv2+ License: GPLv2+
URL: http://ebtables.sourceforge.net/ URL: http://ebtables.sourceforge.net/
@ -90,6 +90,19 @@ fi
if [ $1 -eq 0 ]; then if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove \ %{_sbindir}/update-alternatives --remove \
ebtables %{_sbindir}/ebtables-legacy 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 fi
%files %files
@ -113,6 +126,12 @@ fi
%doc %{_mandir}/man8/ebtables-legacy.8* %doc %{_mandir}/man8/ebtables-legacy.8*
%changelog %changelog
* Tue Jul 30 2024 xinghe <xinghe2@h-partners.com> - 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 <xinghe2@h-partners.com> - 2.0.11-11 * Wed Sep 20 2023 xinghe <xinghe2@h-partners.com> - 2.0.11-11
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA