/etc/network/interfaces, when you install
wpa-supplicant, a script hook is installed in:
The hook is called
wpasupplicant and is a symlink to
/etc/wpa-supplicant/ifupdown.sh, that invokes in turn
This hook will be invoked by
ifdown, and the script the symlink points too tests whether the interface is wireless or not. If that is the case, the command will be passed on to
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:
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
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:
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'
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.
wpa-confis not in my