diff --git a/bsp/wr841n9/root_file_system/etc/network.tl-wr841n-v8 b/bsp/wr841n9/root_file_system/etc/network.tl-wr841n-v8 new file mode 100644 index 0000000..6fb5e24 --- /dev/null +++ b/bsp/wr841n9/root_file_system/etc/network.tl-wr841n-v8 @@ -0,0 +1,7 @@ + +WANDEV=eth0 +# WANDEV=eth0 +SWITCHDEV=eth1 +CLIENT_PORTS="1 4 0t" +WAN_PORTS= +BATMAN_PORTS="3 2 0t" diff --git a/bsp/wr841n9/root_file_system/etc/network.tl-wr841nd-v7 b/bsp/wr841n9/root_file_system/etc/network.tl-wr841nd-v7 new file mode 100644 index 0000000..0414a14 --- /dev/null +++ b/bsp/wr841n9/root_file_system/etc/network.tl-wr841nd-v7 @@ -0,0 +1,7 @@ + +WANDEV=eth1 +# WANDEV=eth0 +SWITCHDEV=eth0 +CLIENT_PORTS="1 2 0t" +WAN_PORTS= +BATMAN_PORTS="3 4 0t" diff --git a/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v8 b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v8 new file mode 100755 index 0000000..9e4fdc1 --- /dev/null +++ b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v8 @@ -0,0 +1,36 @@ + +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 + diff --git a/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v9 b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v9 index ddd79b8..9b9fc72 100755 --- a/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v9 +++ b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841n-v9 @@ -19,3 +19,18 @@ else ifconfig eth0.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/eth0/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 + diff --git a/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841nd-v7 b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841nd-v7 new file mode 100755 index 0000000..45e69a3 --- /dev/null +++ b/bsp/wr841n9/root_file_system/etc/rc.local.tl-wr841nd-v7 @@ -0,0 +1,36 @@ + +if ! uci get nodewatcher.@network[0].client_interfaces; then + IF="eth0.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 eth0.3 (ethmesh)" + NEW_MACADDR=$(cat /sys/class/net/eth1/address) + uci set network.ethmesh.macaddr=$NEW_MACADDR + uci commit + ifconfig eth0.3 down + ifconfig eth0.3 hw ether $NEW_MACADDR + ifconfig eth0.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 +