How to run a helper script on state changes?
Thu Feb 27 08:28:20 PST 2014
On Tue, Feb 25, 2014 at 6:21 PM, Jouni Malinen <j at w1.fi> wrote:
> On Fri, Feb 07, 2014 at 03:55:12PM +0100, Denys Vlasenko wrote:
>> I read "man wpa_supplicant" and "man wpa_supplicant.conf"
>> and I don't see such functionality mentioned anywhere.
>> Did I miss it?
> wpa_supplicant/README and the "Using wpa_cli to run external program on
> connect/disconnect" section.
Thanks, found it.
Looks like a round-about way to achieve it, though:
it needs enabled "ctrl_interface" thing in wpa_supplicant.conf,
it needs a running wpa_cli process all the time,
and since wpa_cli exits if wpa_supplicant is restarted:
# wpa_cli -a /qwe/rty
Selected interface 'wlan0'
wpa_supplicant is terminating - stop monitoring
it also needs a process to babysit wpa_cli.
Any chances wpa_supplicant can be taught to launch
a script by itself, avoiding the need to have an extra process?
As in: would you accept a patch which implements
such a feature?
More information about the Hostap