From 4160441a4bce974c591fd0ce72f8f3099f719b56 Mon Sep 17 00:00:00 2001 From: olijf Date: Thu, 7 Apr 2016 11:16:31 +0200 Subject: [PATCH] Fixed check to see if it has to switch to ap mode --- src/script/wifi-switch-netconfig.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/script/wifi-switch-netconfig.sh b/src/script/wifi-switch-netconfig.sh index b37211f..570cd9b 100755 --- a/src/script/wifi-switch-netconfig.sh +++ b/src/script/wifi-switch-netconfig.sh @@ -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