[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running DHCP once wpa_supplicant associates with an AP?



Joe Emenaker <joe@emenaker.com> writes:

> I think I've asked this before... either that or I searched and read a
> million other threads where they said "That can't be done, yet".
>
> So, I'm trying to find out if it can be done.... *yet*.
>
> All I want to do is have wpa_supplicant trigger a dhclient (or other
> dhcp client) for an interface when it associates with an AP. I've tried
> just putting the "iface eth1 inet dhcp" in /etc/network/interfaces, but
> that doesn't do it... and, last time I additionally put "auto eth1" in
> there, dhclient would try to run at boot time, before wpa_supplicant
> ran... and there'd be a long pause during the boot process while
> dhclient timed-out.

Mmm.  I just have 'iface wlan0 inet dhcp', and make sure that
wpa_supplicant is up before the network is.

You should be able to move the startup earlier - it really doesn't have
many dependencies - so that it starts before your network does.[1]

Just rename the 'S23wpasupplicant' script to 'S01...' or whatever point
you want it to start.

Basically, wpa_supplicant should already be waiting to auth on the
network when dhclient starts.

If you feel strongly enough, file a wishlist bug about moving the
startup earlier in boot so that it *is* up before the network starts;
that probably should happen anyway.

     Daniel

Footnotes: 
[1]  Personally, I manually ifup the interface to start it, because I
     don't usually use wlan.




Reply to: