Re: [dev] [stali] The stali way to wifi

From: Kamil Cholewiński <harry666t_AT_gmail.com>
Date: Tue, 18 Oct 2016 19:46:14 +0200

On Tue, 18 Oct 2016, Bruno Vetter <simplelife2010_AT_outlook.com> 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_AT_wlan0/run
> #!/bin/sh
> set -eu
> iface=${1:-${PWD##*_AT_}}
> rm -f /run/wpa_supplicant/$iface
> exec wpa_supplicant -d -c /etc/wpa_supplicant.conf -i ${iface}

> $ cat /etc/service/dhclient_AT_wlan0/run
> #!/bin/sh
> set -eu
> iface=${PWD##*_AT_}
> sv check wpa_supplicant_AT_${iface}
> exec dhclient -d ${iface}

> $ cat /etc/service/dhclient_AT_wlan0/finish
> #!/bin/sh
> set -eu
> iface=${PWD##*_AT_}
> 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.
Received on Tue Oct 18 2016 - 19:46:14 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 18 2016 - 19:48:11 CEST