File: iptables.prerm

package info (click to toggle)
iptables 1.8.2-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,220 kB
  • sloc: ansic: 55,460; sh: 5,794; makefile: 208; yacc: 187; python: 83; lex: 54
file content (30 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

set -e

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

# compat symlinks for /sbin -> /usr/sbin move, to be dropped in buster+1
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

#DEBHELPER#