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