forked from freifunk-franken/firmware
37 lines
954 B
Plaintext
Executable File
37 lines
954 B
Plaintext
Executable File
|
|
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
|
|
|