remove dead eth0mac code

This commit is contained in:
Fabian Bläse 2021-08-08 15:07:03 +02:00
parent c3cb53ebef
commit 8ec17a34d7
1 changed files with 0 additions and 15 deletions

View File

@ -47,7 +47,6 @@ if [ "$ONE_PORT" = "YES" ]; then
uci set network.wan.ifname="eth2" #eth2 because it is default in config file
uci set network.ethmesh.ifname="$SWITCHDEV"
ETH0DEV="$SWITCHDEV"
ETH0MAC="w2ap"
fi
uci commit network
fi
@ -91,12 +90,10 @@ elif [ "$TWO_PORT" = "YES" ]; then
fi
if [ "$LAN0MODE" = "BATMAN" ]; then
ETH0DEV="$WANDEV" # only needed for setting macaddr
ETH0MAC=w2ap
uci del network.$SWITCHDEV.macaddr
elif [ "$LAN1MODE" = "BATMAN" ]; then
# $WANDEV will win if both are set to BATMAN, as above
ETH0DEV="$SWITCHDEV" # only needed for setting macaddr
ETH0MAC=w2ap
uci del network.$WANDEV.macaddr
else
uci del network.$WANDEV.macaddr
@ -210,18 +207,6 @@ if [ -n "$ROUTERMAC" ]; then
fi
fi
if [ -n "$ETH0MAC" ]; then
echo "Fixing MAC on $ETH0DEV"
sleep 10
NEW_MACADDR=$(cat "/sys/class/net/${ETH0MAC}/address")
uci set network.$ETH0DEV.macaddr=$NEW_MACADDR
uci commit network
ifconfig $ETH0DEV down
ifconfig $ETH0DEV hw ether $NEW_MACADDR
ifconfig $ETH0DEV up
/etc/init.d/network restart
fi
if uci -q get "network.client.ip6addr" > /dev/null
then
echo "IPv6 for client is set already"