forked from freifunk-franken/firmware
Use SWITCHDEV variable for mac address fixing
This makes use of the SWITCHDEV variable to ensure that the correct interface is used for mac address fixing on devices, that do not use eth0 for the switch. Signed-off-by: Fabian Bläse <fabian@blaese.de> Reviewed-by: Christian Dresel <fff@chrisi01.de>
This commit is contained in:
parent
8297da7051
commit
1eaa0075fd
|
@ -162,15 +162,15 @@ if [[ -n "$ETHMESHMAC" ]]; then
|
||||||
then
|
then
|
||||||
echo "MAC for ethmesh is set already"
|
echo "MAC for ethmesh is set already"
|
||||||
else
|
else
|
||||||
echo "Fixing MAC on eth0.3 (ethmesh)"
|
echo "Fixing MAC on $SWITCHDEV.3 (ethmesh)"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
uci set network.ethmesh.macaddr=$ETHMESHMAC
|
uci set network.ethmesh.macaddr=$ETHMESHMAC
|
||||||
uci commit
|
uci commit
|
||||||
|
|
||||||
ifconfig eth0.3 down
|
ifconfig $SWITCHDEV.3 down
|
||||||
ifconfig eth0.3 hw ether $NEW_MACADDR
|
ifconfig $SWITCHDEV.3 hw ether $NEW_MACADDR
|
||||||
ifconfig eth0.3 up
|
ifconfig $SWITCHDEV.3 up
|
||||||
/etc/init.d/network restart
|
/etc/init.d/network restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user