1
0
forked from jengelh/iptables

Only call u-a remove when the package is completely going away

OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iptables?expand=0&rev=107
This commit is contained in:
Jan Engelhardt 2018-08-29 07:43:41 +00:00 committed by Git OBS Bridge
parent 3c84df208f
commit eacc4f7ab6

View File

@ -191,7 +191,9 @@ update-alternatives \
--slave "%_sbindir/ip6tables-save" ip6tables-save "%_sbindir/xtables-legacy-multi"
%postun
update-alternatives --remove iptables "%_sbindir/xtables-legacy-multi"
if test "$1" = 0; then
update-alternatives --remove iptables "%_sbindir/xtables-legacy-multi"
fi
%post backend-nft
update-alternatives \
@ -209,9 +211,11 @@ update-alternatives --install "%_sbindir/ebtables" ebtables "%_sbindir/xtables-n
--slave "%_sbindir/ebtables-save" ebtables-save "%_sbindir/xtables-nft-multi"
%postun backend-nft
update-alternatives --remove iptables "%_sbindir/xtables-nft-multi"
update-alternatives --remove arptables "%_sbindir/xtables-nft-multi"
update-alternatives --remove ebtables "%_sbindir/xtables-nft-multi"
if test "$1" = 0; then
update-alternatives --remove iptables "%_sbindir/xtables-nft-multi"
update-alternatives --remove arptables "%_sbindir/xtables-nft-multi"
update-alternatives --remove ebtables "%_sbindir/xtables-nft-multi"
fi
%post -n libipq0 -p /sbin/ldconfig
%postun -n libipq0 -p /sbin/ldconfig