firmware/bsp/wr841/root_file_system/etc/rc.local.tl-wr841n-v8
Tim Niemeyer 504ed627a9 bsp: replace wr841n8/wr841nd7 with wr841n9
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2014-08-16 13:10:30 +02:00

37 lines
954 B
Plaintext
Executable File

if ! uci get nodewatcher.@network[0].client_interfaces; then
IF="eth1.1 wlan0-1"
echo "Setting nodewatchers client interfaces to: $IF"
uci set nodewatcher.@network[0].client_interfaces="$IF"
uci commit
fi
if uci get network.ethmesh.macaddr
then
echo "MAC for ethmesh is set already"
else
echo "Fixing MAC on eth1.3 (ethmesh)"
NEW_MACADDR=$(cat /sys/class/net/eth0/address)
uci set network.ethmesh.macaddr=$NEW_MACADDR
uci commit
ifconfig eth1.3 down
ifconfig eth1.3 hw ether $NEW_MACADDR
ifconfig eth1.3 up
/etc/init.d/network reload
fi
if uci get network.mesh.macaddr
then
echo "MAC for mesh is set already"
else
echo "Fixing MAC on br-mesh (mesh)"
NEW_MACADDR=$(cat /sys/class/net/wlan0/address)
uci set network.mesh.macaddr=$NEW_MACADDR
uci commit
ifconfig br-mesh down
ifconfig br-mesh hw ether $NEW_MACADDR
ifconfig br-mesh up
/etc/init.d/network reload
fi