mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
wifimngr: start WPS in client mode correctly
This commit is contained in:
parent
5d16f075ab
commit
42bc8f91ce
1 changed files with 4 additions and 4 deletions
|
|
@ -32,12 +32,12 @@ case "$ACTION" in
|
||||||
echo "WPS button is pressed" > /dev/console
|
echo "WPS button is pressed" > /dev/console
|
||||||
# TODO: Proper implementation
|
# TODO: Proper implementation
|
||||||
#ubus call wifi.wps start
|
#ubus call wifi.wps start
|
||||||
devsta="$(uci show wireless | grep 'apsta=.1' | head -1 | cut -d '.' -f2)"
|
wpasupp="$(ubus list wpa_supplicant.* | head -1)"
|
||||||
if [ -n "$devsta" ]; then
|
if [ -n "$wpasupp" ]; then
|
||||||
ubus -t 1 call hostapd.$devsta wps_start
|
ubus -t 1 call $wpasupp wps_start
|
||||||
else
|
else
|
||||||
dev5g="$(uci show wireless | grep 'hwmode=.11a' | head -1 | cut -d '.' -f2)"
|
dev5g="$(uci show wireless | grep 'hwmode=.11a' | head -1 | cut -d '.' -f2)"
|
||||||
ubus -t 1 call hostapd.$dev5g wps_start
|
[ -n "$dev5g" ] && ubus -t 1 call hostapd.$dev5g wps_start
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue