openwrt/package/network/services
Raphaël Mélotte 69ce75fb12 hostapd: add fallback for WPS on stations
Up to now the WPS script triggered WPS on the stations only if it
could not trigger it successfully on any hostapd instance.

In a Multi-AP context, there can be a need (to establish a new
wireless backhaul link) to trigger WPS on the stations, regardless of
whether there is already a hostapd instance configured or not. The
current script makes it impossible, as if hostapd is running and
configured, WPS would always be triggered on hostapd only.

To allow both possibilities, the following changes are made:

- Change the "pressed" action to "release", so that we can make use of
the "$SEEN" variables (to know for how long the button was pressed).

- If the button is pressed for less than 3 seconds, keep the original
behavior.

- If the button is pressed for 3 seconds or more, trigger WPS on the
stations, regardless of the status of any running hostapd instance.

- Add comments explaining both behaviors.

- While at it, replace the usage of '-a' with a '[] && []'
construct (see [1]).

This gives users a "fallback" mechanism to onboard a device to a
Multi-AP network, even if the device already has a configured hostapd
instance running.

[1]: https://github.com/koalaman/shellcheck/wiki/SC2166

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2021-12-27 16:32:02 +00:00
..
dnsmasq dnsmasq: fix ismounted check 2021-11-23 14:57:52 +00:00
dropbear dropbear: add config options for agent-forwarding support 2021-10-30 16:32:54 +02:00
ead ead: fix resource leak in tinysrp 2020-01-05 19:36:46 +01:00
hostapd hostapd: add fallback for WPS on stations 2021-12-27 16:32:02 +00:00
ipset-dns base-files: move /tmp/resolv.conf.auto to /tmp/resolv.conf.d/ 2020-01-07 15:36:03 +02:00
lldpd lldpd: add reload trigger 2021-11-14 21:26:41 +02:00
odhcpd odhcpd: update to latest git HEAD 2021-08-23 21:53:13 +02:00
omcproxy omcproxy: bump to git HEAD 2021-11-04 15:04:45 +02:00
ppp ppp: compile fix: unset FILTER variable in Makefile 2021-03-19 00:25:58 +01:00
relayd relayd: bump to version 2020-04-25 2020-04-26 13:00:36 +01:00
uhttpd uhttpd: add config option for json_script 2021-08-24 14:45:42 +03:00
umdns umdns: add missing syscall to seccomp filter 2021-10-27 19:25:59 +01:00
ustp ustp: update to the latest version 2021-09-21 19:43:20 +02:00