File: arptables.postinst

package info (click to toggle)
arptables 0.0.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 356 kB
  • sloc: ansic: 4,447; perl: 81; makefile: 64; sh: 29
file content (29 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# postinst script for arptables
#
# see: dh_installdeb(1)

set -e

# compat symlinks for /sbin -> /usr/sbin move, to be dropped in buster+1

if [ "$1" = "configure" ]; then
   LIST="arptables arptables-save arptables-restore"

   for i in $LIST; do
       if [ ! -e "/sbin/$i" ]; then
	   ln -sf /usr/sbin/$i /sbin/$i
       fi
   done
fi

# Providing alternatives with lower priority than those provided by iptables >= 1.8

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ];then
    update-alternatives \
	--install /usr/sbin/arptables arptables /usr/sbin/arptables-legacy 10 \
	--slave /usr/sbin/arptables-restore arptables-restore /usr/sbin/arptables-legacy-restore \
	--slave /usr/sbin/arptables-save arptables-save /usr/sbin/arptables-legacy-save
fi

#DEBHELPER#