iptables.prerm 895 Bytes
Newer Older
1
2
3
4
#!/bin/sh

set -e

5
6
7
8
9
10
11
12
13
if [ "$1" != "upgrade" ]; then
    update-alternatives --remove iptables /usr/sbin/iptables-legacy
    update-alternatives --remove ip6tables /usr/sbin/ip6tables-legacy
    update-alternatives --remove iptables /usr/sbin/iptables-nft
    update-alternatives --remove ip6tables /usr/sbin/ip6tables-nft
    update-alternatives --remove arptables /usr/sbin/arptables-nft
    update-alternatives --remove ebtables /usr/sbin/ebtables-nft
fi

14
15
16
# remove compat symlinks for /sbin -> /usr/sbin move
# This piece of code can be dropped eventually, when we are confident user
# systems are left in a consistent state.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if [ "$1" = "remove" ] ; then
	LIST="/sbin/iptables
	     /sbin/iptables-save
	     /sbin/iptables-restore
	     /sbin/ip6tables
	     /sbin/ip6tables-save
	     /sbin/ip6tables-restore"

	for i in $LIST ; do
		if [ -L "$i" ] ; then
			rm $i
		fi
	done
fi

32
#DEBHELPER#