[RFC][PATCH] wpa-supplicant: add capability to run action script directly
maillist-hostap at barfooze.de
Thu Nov 27 07:59:04 EST 2014
Instead of having to run wpa_cli as a service to be able to execute an
action script on CONNECT/DISCONNECT events (for the purpose of being
able to get a DHCP address or assign one manually), it is much simpler
and less resource-consuming to just run the action script directly from
wpa_supplicant, which runs anyway.
The dbus functionality is no option either as it requires running a
daemon permanently as well (plus dbus may not even be installed, as is
the case on sabotage linux).
The action script pathname is specified via a action_script variable in
the global section of wpa_supplicant.conf
example action script:
case "$state" in
CONNECTED) dhclient "$itf" ;;
DISCONNECTED) ifconfig "$itf" down ;;
Please note that the code to pass the SSID of the connected wifi as a
third parameter doesn't seem to work atm (only passes an empty string).
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the HostAP