Compare commits

...

1 Commits
meng ... wps

Author SHA1 Message Date
Janusz Dziedzic
1882e6f8ad wifimngr: start wps on all APs
Enumerate all APs and start WPS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2021-03-24 11:22:55 +00:00

View File

@@ -20,6 +20,13 @@ wifi_onoff() {
/sbin/wifi reload &
}
start_ap_wps() {
for ap in $(ubus list |grep hostapd.)
do
ubus call $ap wps_start
done
}
case "$ACTION" in
add|register)
[ "wifibutton" == "$INTERFACE" ] && {
@@ -36,8 +43,7 @@ case "$ACTION" in
if [ -n "$wpasupp" ]; then
ubus -t 1 call $wpasupp wps_start
else
dev5g="$(uci show wireless | grep 'hwmode=.11a' | head -1 | cut -d '.' -f2)"
[ -n "$dev5g" ] && ubus -t 1 call hostapd.$dev5g wps_start
start_ap_wps
fi
}
;;