!70 fix ebtables-restore --noflush failed when ebtables is uninstall

From: @xinghe_1 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
This commit is contained in:
openeuler-ci-bot 2024-07-31 01:44:40 +00:00 committed by Gitee
commit 885cc03c57
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: ebtables
Version: 2.0.11
Release: 8
Release: 9
Summary: A filtering tool for a Linux-based bridging firewall
License: GPLv2+
URL: http://ebtables.sourceforge.net/
@ -85,6 +85,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
@ -108,6 +121,12 @@ fi
%doc %{_mandir}/man8/ebtables-legacy.8*
%changelog
* Tue Jul 30 2024 xinghe <xinghe2@h-partners.com> - 2.0.11-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix ebtables-restore --noflush failed when ebtables is uninstall
* Thu Aug 31 2023 lifeifei<lifeifei@kylinos.cn> - 2.0.11-8
- Type:bugfix
- ID:NA