:: Re: [DNG] wpa_supplicant/ifup integ…
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng
Subject: Re: [DNG] wpa_supplicant/ifup integration documentation
Le 25/08/2015 03:40, Isaac Dunham a écrit :
> For your perusal, here's an overview of how they work together; it's a 100+
> line summary.
> If anyone wants more details, here are some sources:
> Manual pages:
> interfaces(5), wpa_supplicant.conf(5), wpa_supplicant(8), wpa_cli(8),
> wpa_action(8).
> Scripts:
> /sbin/wpa_action
> /etc/network/if-*.d/wpasupplicant
> /etc/wpa_supplicant/*.sh
> (/etc/wpa_supplicant/functions.sh is going to be needed if you want a
> low-level understanding of what's going on; the script authors have an
> exceptional capacity for indirection.)
>
> You will need to read the scripts for a practical understanding of how
> it works, but the interfaces, wpa_cli, and wpa_action manpages are rather
> helpful for understanding the glue.


     Thanks, Isaac, I had made my best to RTFM :-) but what I couldn't 
find is how the line wpa_roam ... is passed to the script.


     Here is the idea I got from looking at the scripts. Any line 
following the iface line is interpreted by ifup in the following way 
before invoking all the scripts:


     The first token in the line is capitallized and prefixed with 
"IF_", then, an environment variable with this name is created and its  
value is the rest of the line. Each line following the iface line is 
treated like this and all the scripts can then check the enviroment 
variables. This is not the whole story though, since I remember it is 
also possible to put command lines -- I did it a few years ago to 
configure bonding interfaces.


     Therefore, asserting all this is still on my todo list, and maybe 
the only way is to look at the source of ifup, althoug I would have 
preferred a more authoritative description. For now, my feeling is still 
that it makes little sense to set up a parallel framework when what is 
missing is only a tinier version of wpa_gui, and maybe first a curses 
version.


     Thanks.
                         Didier