As for `/etc/network/interfaces`, when you install `wpa-supplicant`, a script hook is installed in: - `/etc/network/if-down.d` - `/etc/network/if-post-down.d` - `/etc/network/if-pre-up.d` - `/etc/network/if-up.d`, The hook is called `wpasupplicant` and is a symlink to `/etc/wpa-supplicant/ifupdown.sh`, that invokes in turn `/etc/wpa-supplicant/functions.sh`. This hook will be invoked by `runparts` in `ifup` / `ifdown`, and the script the symlink points too tests wether the interface is wireless or not. If that is the case, the command will be passed on to `wpa-supplicant`. For acting on the commands, passing them to `/sbin/wpa-supplicant`, it seems the script `/sbin/wpa_action` and the binary `/sbin/wpa_cli` are used. I found an old page talking about this here: http://manual.siduction.org/inet-wpa > As mentioned earlier, each wpa_supplicant specific element is prefixed > with 'wpa-'. Each element correlates to a property of wpa_supplicant > described in the wpa_supplicant.conf(5), wpa_supplicant(8) and > wpa_cli(8) manpages. > > The supplicant is launched without any pre-configuration whatsoever, > and wpa_cli forms a network configuration from the input provided by > the 'wpa-*' lines. Initially, wpa_supplicant/wpa_cli does not directly > set the properties of the device (like setting an essid with iwconfig, > for example), rather it informs the device of what access point is > suitable to associate with. Once the device has scanned the area, and > found that the suitable access point is available for use, these > properties are set. > > The script that does all the work is located at: > > /etc/wpa_supplicant/ifupdown.sh /etc/wpa_supplicant/functions.sh > ifupdown.sh is executed by run-parts, which in turn is invoked by > ifupdown during the 'pre-up', 'pre-down' and 'post-down' phases. > > In the 'pre-up' phase, a wpa_supplicant daemon is launched followed by > a series of wpa_cli commands that set up a network configuration > according to what 'wpa-' options were used in /etc/network/interfaces > for the physical device. > > If wpa-roam is used, a wpa_cli daemon is lauched in the 'post-up' > phase. > > In the 'pre-down' phase, the wpa_cli daemon is killed if it exists. > > In the 'post-down' phase, the wpa_supplicant daemon is killed.