Skip to content
Snippets Groups Projects
Commit 45b350c0 authored by Sukru Senli's avatar Sukru Senli
Browse files

wifi: send credentials from first wifi network

parent 3357f6ea
No related branches found
No related tags found
1 merge request!1Fr # 15187
...@@ -1001,7 +1001,10 @@ configure_wifi() { ...@@ -1001,7 +1001,10 @@ configure_wifi() {
# configure connected repeaters/extenders # configure connected repeaters/extenders
for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}' ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
wificontrol --router -v 4 >/dev/console grep -q ssid /tmp/wificontrol.txt && {
wificontrol --router -v 4 >/dev/console
break # do not continue with the rest of the networks
}
done done
fi fi
......
...@@ -702,7 +702,10 @@ else ...@@ -702,7 +702,10 @@ else
killall -9 wificontrol >/dev/null 2>&1 killall -9 wificontrol >/dev/null 2>&1
for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do for network in $(uci show network | grep "is_lan='1'" | grep -v loopback | cut -d'.' -f2); do
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}' ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
wificontrol --router -v 4 >/dev/console grep -q ssid /tmp/wificontrol.txt && {
wificontrol --router -v 4 >/dev/console
break # do not continue with the rest of the networks
}
done done
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment