wpa_cli event handling

Roy Marples uberlord at gentoo.org
Thu Dec 22 09:24:01 EST 2005

On Thursday 22 December 2005 13:50, Paul Fox wrote:
> but i have a simple question:  why isn't the action script that's
> invoked passed the ssid of the network that's been joined?  right
> now the script gets the interface name, and dis/connected status.
> the very first thing the action script will probably have to do
> is ask the interface what network it's on. 

My original patch didn't send the SSID, and when Jouni merged by patch in he 
didn't see the need to either. Easy to get the SSID though.

ssid="$( wpa_cli -i${iface} status | sed -n -e 's/^ssid=//p' )"
echo "You're connected to \"${ssid}\""

> i'm sure there was a 
> reason for leaving this information out of the the script
> transaction, but i'm curious what it was.  was it just to keep
> the script interface to the absolute minimum?

The reason is that most interaces are configured like so

/etc/init.d/net.eth0 start (Gentoo specific)
ifup eth0 (Most distros)

So passing anything except a start/stop is tricky at best.

Roy Marples <uberlord at gentoo.org>
Gentoo Linux Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20051222/623ebc55/attachment.pgp 

More information about the HostAP mailing list