0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 02:53:49 +01:00

Fixed check to see if it has to switch to ap mode

This commit is contained in:
olijf 2016-04-07 11:16:31 +02:00
parent 7397066ad9
commit 4160441a4b

View File

@ -9,9 +9,13 @@ if [ "$SEEN" -lt 1 ]
then
#see https://github.com/Doodle3D/doodle3d-firmware/blob/master/src/network/wlanconfig.lua#L188 for reference
#check if network on top is in STA mode
if [ $(uci get wireless.@wifi-iface[0].mode) == "sta" ];
if [ $(uci get wireless.@wifi-iface[1].mode) == "ap" ]
then
logger "switching to AP"
if [ $(uci get wireless.@wifi-iface[1].network) != "wlan" ] #edge case when only the factory default openwrt network is available
then
uci set wireless.@wifi-iface[1].network=wlan
fi
#configure dhcp
uci delete network.wlan
uci set network.wlan=interface