ansible.fftdf.supernode/files/bataddif.sh.j2
2016-03-05 19:46:04 +01:00

19 lines
503 B
Django/Jinja

#!/bin/bash
INTERFACE="$3"
MAC="$8"
brctl=/sbin/brctl
BLOCKLISTE=$(/bin/cat /opt/freifunk/tunneldigger-blacklist.txt)
wget -q -O /opt/freifunk/tunneldigger-blacklist.txt https://raw.githubusercontent.com/Freifunk-Troisdorf/tunneldigger-blockliste/master/macs.txt
/bin/ip link set dev $INTERFACE up mtu 1312
for i in $BLOCKLISTE;
do
if [[ $i == $MAC ]]; then
exit 1
fi
done
#echo "enabled" > /sys/devices/virtual/net/$INTERFACE/batman_adv/no_rebroadcast
$brctl addif br-nodes $INTERFACE