|
|
@ -64,7 +64,7 @@ add_wifi_mesh() {
|
|
|
|
uci set wireless.mesh_$apall.network=nwi_mesh_${apall}
|
|
|
|
uci set wireless.mesh_$apall.network=nwi_mesh_${apall}
|
|
|
|
uci set wireless.mesh_$apall.mode='mesh'
|
|
|
|
uci set wireless.mesh_$apall.mode='mesh'
|
|
|
|
uci set wireless.mesh_$apall.mesh_id=$mesh_id
|
|
|
|
uci set wireless.mesh_$apall.mesh_id=$mesh_id
|
|
|
|
uci set wireless.mesh_$apall.mesh_fwding='0'
|
|
|
|
uci set wireless.mesh_$apall.mesh_fwding='1'
|
|
|
|
uci set wireless.mesh_$apall.mesh_ttl='1'
|
|
|
|
uci set wireless.mesh_$apall.mesh_ttl='1'
|
|
|
|
uci set wireless.mesh_$apall.mcast_rate='24000'
|
|
|
|
uci set wireless.mesh_$apall.mcast_rate='24000'
|
|
|
|
uci set wireless.mesh_$apall.disabled='0'
|
|
|
|
uci set wireless.mesh_$apall.disabled='0'
|
|
|
@ -79,7 +79,13 @@ add_wifi_mesh() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$encryption" != 1 ]; then
|
|
|
|
if [ "$encryption" != 1 ]; then
|
|
|
|
apnum=$(echo $mesh_apRadio | awk -F'radio' '{print $2}')
|
|
|
|
apnum="${mesh_apRadio#radio}"
|
|
|
|
|
|
|
|
apnum=$((apnum + 1))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check until a free wifinetX is found
|
|
|
|
|
|
|
|
while uci get wireless.wifinet$apnum > /dev/null 2>&1; do
|
|
|
|
|
|
|
|
apnum=$((apnum + 1))
|
|
|
|
|
|
|
|
done
|
|
|
|
uci set wireless.mesh_$apall.encryption='none'
|
|
|
|
uci set wireless.mesh_$apall.encryption='none'
|
|
|
|
uci set wireless.wifinet$apnum=wifi-iface
|
|
|
|
uci set wireless.wifinet$apnum=wifi-iface
|
|
|
|
uci set wireless.wifinet$apnum.device=$mesh_apRadio
|
|
|
|
uci set wireless.wifinet$apnum.device=$mesh_apRadio
|
|
|
@ -92,10 +98,16 @@ add_wifi_mesh() {
|
|
|
|
uci set wireless.wifinet$apnum.ft_over_ds='0'
|
|
|
|
uci set wireless.wifinet$apnum.ft_over_ds='0'
|
|
|
|
uci set wireless.wifinet$apnum.ft_psk_generate_local='1'
|
|
|
|
uci set wireless.wifinet$apnum.ft_psk_generate_local='1'
|
|
|
|
uci set wireless.wifinet$apnum.network='lan'
|
|
|
|
uci set wireless.wifinet$apnum.network='lan'
|
|
|
|
uci delete wireless.$mesh_apRadio.disabled
|
|
|
|
#uci delete wireless.$mesh_apRadio.disabled
|
|
|
|
uci commit wireless
|
|
|
|
uci commit wireless
|
|
|
|
else
|
|
|
|
else
|
|
|
|
apnum=$(echo $mesh_apRadio | awk -F'radio' '{print $2}')
|
|
|
|
apnum="${mesh_apRadio#radio}"
|
|
|
|
|
|
|
|
apnum=$((apnum + 1))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check until a free wifinetX is found
|
|
|
|
|
|
|
|
while uci get wireless.wifinet$apnum > /dev/null 2>&1; do
|
|
|
|
|
|
|
|
apnum=$((apnum + 1))
|
|
|
|
|
|
|
|
done
|
|
|
|
uci set wireless.mesh_$apall.encryption='sae'
|
|
|
|
uci set wireless.mesh_$apall.encryption='sae'
|
|
|
|
uci set wireless.mesh_$apall.key=$key
|
|
|
|
uci set wireless.mesh_$apall.key=$key
|
|
|
|
uci set wireless.wifinet$apnum=wifi-iface
|
|
|
|
uci set wireless.wifinet$apnum=wifi-iface
|
|
|
@ -109,7 +121,7 @@ add_wifi_mesh() {
|
|
|
|
uci set wireless.wifinet$apnum.ft_over_ds='0'
|
|
|
|
uci set wireless.wifinet$apnum.ft_over_ds='0'
|
|
|
|
uci set wireless.wifinet$apnum.ft_psk_generate_local='1'
|
|
|
|
uci set wireless.wifinet$apnum.ft_psk_generate_local='1'
|
|
|
|
uci set wireless.wifinet$apnum.network='lan'
|
|
|
|
uci set wireless.wifinet$apnum.network='lan'
|
|
|
|
uci delete wireless.$mesh_apRadio.disabled
|
|
|
|
#uci delete wireless.$mesh_apRadio.disabled
|
|
|
|
uci commit wireless
|
|
|
|
uci commit wireless
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -231,10 +243,7 @@ uci delete network.wan
|
|
|
|
uci delete network.wan6
|
|
|
|
uci delete network.wan6
|
|
|
|
uci delete network.lan.ipaddr
|
|
|
|
uci delete network.lan.ipaddr
|
|
|
|
uci delete network.lan.netmask
|
|
|
|
uci delete network.lan.netmask
|
|
|
|
|
|
|
|
|
|
|
|
echo changing the hostname to easymesh
|
|
|
|
|
|
|
|
uci set system.@system[0].hostname=$gateway
|
|
|
|
uci set system.@system[0].hostname=$gateway
|
|
|
|
|
|
|
|
|
|
|
|
uci commit
|
|
|
|
uci commit
|
|
|
|
|
|
|
|
|
|
|
|
echo removing firewall config
|
|
|
|
echo removing firewall config
|
|
|
@ -288,9 +297,9 @@ start() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
stop() {
|
|
|
|
return
|
|
|
|
ap_mode_stop
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
restart() {
|
|
|
|
restart() {
|
|
|
|
set_easymesh
|
|
|
|
set_easymesh
|
|
|
|
}
|
|
|
|
}
|