wpa_cli event handling

Roy Marples uberlord
Thu Dec 22 07:11:32 PST 2005


On Thursday 22 December 2005 15:00, Paul Fox wrote:>  >
>  > 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.)

No guarantee that wireless-tools is installed .....

>
>  > 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.
>

Gentoo init scripts configure the interface for the SSID connected to, so it 
could be dhcp or it could be static. You can even configure dns, ntp or NIS 
differently per SSID. You can even run SSID speific scripts if you need to.

I know as I wrote that part of Gentoo ;)

I don't know if any other distro supports similar configuration possibilities 
yet. I think that NetworkManager can do similar, but I've never gotten it not 
to segfault.

-- 
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/35374039/attachment.pgp 



More information about the Hostap mailing list