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

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

@ -79,13 +79,29 @@ add_wifi_mesh() {
fi
if [ "$encryption" != 1 ]; then
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
if [ "$mesh_apRadio" == "radio0" ]; then
apnum="0"
elif [ "$mesh_apRadio" == "radio1" ]; then
apnum="1"
elif [ "$mesh_apRadio" == "radio2" ]; then
apnum="2"
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.wifinet$apnum=wifi-iface
uci set wireless.wifinet$apnum.device=$mesh_apRadio
@ -101,13 +117,29 @@ add_wifi_mesh() {
#uci delete wireless.$mesh_apRadio.disabled
uci commit wireless
else
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
if [ "$mesh_apRadio" == "radio0" ]; then
apnum="0"
elif [ "$mesh_apRadio" == "radio1" ]; then
apnum="1"
elif [ "$mesh_apRadio" == "radio2" ]; then
apnum="2"
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.key=$key
uci set wireless.wifinet$apnum=wifi-iface

Loading…
Cancel
Save