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

fix double AP bug on restart
pull/1/head
ben 12 months ago
parent 633344d114
commit 72e1ab1199

@ -79,13 +79,29 @@ add_wifi_mesh() {
fi fi
if [ "$encryption" != 1 ]; then if [ "$encryption" != 1 ]; then
apnum="${mesh_apRadio#radio}" if [ "$mesh_apRadio" == "radio0" ]; then
apnum=$((apnum + 1)) apnum="0"
elif [ "$mesh_apRadio" == "radio1" ]; then
# Check until a free wifinetX is found apnum="1"
while uci get wireless.wifinet$apnum > /dev/null 2>&1; do elif [ "$mesh_apRadio" == "radio2" ]; then
apnum=$((apnum + 1)) apnum="2"
done elif [ "$mesh_apRadio" == "radio3" ]; then
apnum="3"
elif [ "$mesh_apRadio" == "radio4" ]; then
apnum="4"
elif [ "$mesh_apRadio" == "radio5" ]; then
apnum="5"
elif [ "$mesh_apRadio" == "radio6" ]; then
apnum="6"
elif [ "$mesh_apRadio" == "radio7" ]; then
apnum="7"
elif [ "$mesh_apRadio" == "radio8" ]; then
apnum="8"
elif [ "$mesh_apRadio" == "radio9" ]; then
apnum="9"
elif [ "$mesh_apRadio" == "radio10" ]; then
apnum="10"
fi
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
@ -101,13 +117,29 @@ add_wifi_mesh() {
#uci delete wireless.$mesh_apRadio.disabled #uci delete wireless.$mesh_apRadio.disabled
uci commit wireless uci commit wireless
else else
apnum="${mesh_apRadio#radio}" if [ "$mesh_apRadio" == "radio0" ]; then
apnum=$((apnum + 1)) apnum="0"
elif [ "$mesh_apRadio" == "radio1" ]; then
# Check until a free wifinetX is found apnum="1"
while uci get wireless.wifinet$apnum > /dev/null 2>&1; do elif [ "$mesh_apRadio" == "radio2" ]; then
apnum=$((apnum + 1)) apnum="2"
done elif [ "$mesh_apRadio" == "radio3" ]; then
apnum="3"
elif [ "$mesh_apRadio" == "radio4" ]; then
apnum="4"
elif [ "$mesh_apRadio" == "radio5" ]; then
apnum="5"
elif [ "$mesh_apRadio" == "radio6" ]; then
apnum="6"
elif [ "$mesh_apRadio" == "radio7" ]; then
apnum="7"
elif [ "$mesh_apRadio" == "radio8" ]; then
apnum="8"
elif [ "$mesh_apRadio" == "radio9" ]; then
apnum="9"
elif [ "$mesh_apRadio" == "radio10" ]; then
apnum="10"
fi
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

Loading…
Cancel
Save