wpa_cli event handling

Paul Fox pgf
Thu Dec 22 07:00:35 PST 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.
 > 
 > iface="eth0"
 > ssid="$( wpa_cli -i${iface} status | sed -n -e 's/^ssid=//p' )"
 > echo "You're connected to \"${ssid}\""

oh, sure, i understand that.  but you just ran three or four
processes to get a text string that was available in the first
place.  :-)  ("iwgetid -r" would work nicely too, if you have it.)

 > The reason is that most interaces are configured like so
 > 
 > /etc/init.d/net.eth0 start (Gentoo specific)
 > ifup eth0 (Most distros)

except that those examples both assume that the interface is
always configured via DHCP, correct?  that's often not the case --
if i need to configure a static IP on some networks, i need to
pass different information to ifup, or whatever.  and for that i
need the ssid.

anyway, now i understand the history of the feature.  i think
i would have added ssid as an argument, but the interface is
certainly sufficient as is.  thanks!

paul
=---------------------
 paul fox, pgf at brightstareng.com




More information about the Hostap mailing list