Update 'root/etc/init.d/easymesh'

pull/1/head
ben 1 year ago
parent 66ee107d4d
commit 6ee428b15c

@ -64,7 +64,7 @@ add_wifi_mesh() {
uci set wireless.mesh_$apall.network=nwi_mesh_${apall}
uci set wireless.mesh_$apall.mode='mesh'
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.mcast_rate='24000'
uci set wireless.mesh_$apall.disabled='0'
@ -79,7 +79,13 @@ add_wifi_mesh() {
fi
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.wifinet$apnum=wifi-iface
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_psk_generate_local='1'
uci set wireless.wifinet$apnum.network='lan'
uci delete wireless.$mesh_apRadio.disabled
#uci delete wireless.$mesh_apRadio.disabled
uci commit wireless
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.key=$key
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_psk_generate_local='1'
uci set wireless.wifinet$apnum.network='lan'
uci delete wireless.$mesh_apRadio.disabled
#uci delete wireless.$mesh_apRadio.disabled
uci commit wireless
fi
}
@ -231,10 +243,7 @@ uci delete network.wan
uci delete network.wan6
uci delete network.lan.ipaddr
uci delete network.lan.netmask
echo changing the hostname to easymesh
uci set system.@system[0].hostname=$gateway
uci commit
echo removing firewall config
@ -288,7 +297,7 @@ start() {
}
stop() {
return
ap_mode_stop
}
restart() {

Loading…
Cancel
Save