|
This action script manages the associated network interfaces. It start
them when wpa_supplicant successfully established a connection and it
stops them when wpa_supplicant disconnected from an access point.
When traveling between different location / networks / access points
with my laptop I noticed that udhcpc didn't automatically require a new
lease and had to be restarted each time I was associated with a new
access point. I had to manually invoke `ifdown <interface> && ifup
<interface>` each time I associated with a new access point.
Searching for solutions I looked at gentoo's netifrc[1] and noticed that
they are using a wpa_cli(8) action script[2] to solve this. I read the
gentoo action script[3] and decided to write a new action script for
alpine loosely based on gentoo's version. This is the result.
Maybe there is a better way to solve this problem if so I would to hear
about it. Otherwise I believe that this is the best approach to solve
it. It should also make it unnecessary to add the wpa_supplicant service
to the boot level since it doesn't need to be started before the
networking service anymore.
The action script has to be started manually using `wpa_cli -a
/etc/wpa_supplicant/wpa_cli.sh` currently. I couldn't decide how to
start it automatically. Gentoo starts it as a part of netifrc using
start-stop-daemon[4]. Maybe we should start it with the same options
from the wpa_supplicant OpenRC service?
[1]: https://gitweb.gentoo.org/proj/netifrc.git
[2]: https://gitweb.gentoo.org/proj/netifrc.git/tree/net/wpa_supplicant.sh#n54
[3]: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_cli.sh
[4]: https://gitweb.gentoo.org/proj/netifrc.git/tree/net/wpa_supplicant.sh#n164
|