Update bataddif.sh.j2

This commit is contained in:
stebifan 2016-03-05 19:46:04 +01:00
parent 978fd68c70
commit 25a0dfb812

View File

@ -2,23 +2,17 @@
INTERFACE="$3" INTERFACE="$3"
MAC="$8" MAC="$8"
brctl=/sbin/brctl brctl=/sbin/brctl
BLACKLISTFILE=/opt/freifunk/tunneldigger-blacklist.txt 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 wget -q -O /opt/freifunk/tunneldigger-blacklist.txt https://raw.githubusercontent.com/Freifunk-Troisdorf/tunneldigger-blockliste/master/macs.txt
if [ -f $BLACKLISTFILE ]
then /bin/ip link set dev $INTERFACE up mtu 1312
BLOCKLISTE=$(cat /opt/freifunk/tunneldigger-blacklist.txt)
else
touch=$BLOCKLISTE
fi
for i in $BLOCKLISTE; for i in $BLOCKLISTE;
do do
if [[ $i == $MAC ]]; then if [[ $i == $MAC ]]; then
exit 1 exit 1
echo "$MAC wurde blockiert"
fi fi
done done
/bin/ip link set dev $INTERFACE up mtu 1312
#echo "enabled" > /sys/devices/virtual/net/$INTERFACE/batman_adv/no_rebroadcast #echo "enabled" > /sys/devices/virtual/net/$INTERFACE/batman_adv/no_rebroadcast
$brctl addif br-nodes $INTERFACE $brctl addif br-nodes $INTERFACE