On Tue, 18 Oct 2016, Bruno Vetter <[email protected]> wrote:
> Hi there,
>
> thanks for all the support so far.
> How would one connect to wifi in stali? For me, installing libnl-tiny and
> wpa_supplicant works, but I'd be interested to hear if/how this is meant to
> be achieved in a stali way.
>
> Bruno
Hi Bruno,
not running stali (Debian here), but should work all the same.
I simply put wpa_supplicant and dhclient under runit:
> $ cat /etc/service/wpa_supplicant@wlan0/run
> #!/bin/sh
> set -eu
> iface=${1:-${PWD##*@}}
> rm -f /run/wpa_supplicant/$iface
> exec wpa_supplicant -d -c /etc/wpa_supplicant.conf -i ${iface}
> $ cat /etc/service/dhclient@wlan0/run
> #!/bin/sh
> set -eu
> iface=${PWD##*@}
> sv check wpa_supplicant@${iface}
> exec dhclient -d ${iface}
> $ cat /etc/service/dhclient@wlan0/finish
> #!/bin/sh
> set -eu
> iface=${PWD##*@}
> exec ifconfig ${iface} down
wpa_supplicant.conf contains an annotated list of AP's I want to connect
to, kind of like a phone book:
> $ cat /etc/wpa_supplicant.conf
> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
> # 1234 Random Str. Nowhere
> network={
> ssid="abcd"
> psk="the password"
> }
Cheers!
K.