execute commands on connect using wpa_supplicant

Roy Marples uberlord at gentoo.org
Sat Sep 9 15:06:53 EDT 2006


On Saturday 09 September 2006 14:38, Tiago Requeijo wrote:
> Hi,
> is there a way to execute a script after connecting to a specific ap? I'm
> thinking of something like
>
> network={
>         ssid="simple"
>         psk="very secret passphrase"
>         exec=/path/to/script
> }
>
> This would be extremely useful for those using laptops that have to
> start/stop specific services depending to which network their connected.

wpa_cli can monitor wpa_supplicant and execute a script on 
connection/disconnection. You can either query the AP details by more wpa_cli 
commands or some environmental variables it may have set.

Thanks
-- 
Roy Marples <uberlord at gentoo.org>
Gentoo/Linux Developer (baselayout, networking)



More information about the HostAP mailing list