[Dextrose] ip route in rc.sysinit

Esteban Bordon ebordon at plan.ceibal.edu.uy
Wed Aug 11 07:54:10 EDT 2010


2010/8/10 Bernie Innocenti <bernie at codewiz.org>

> El Tue, 10-08-2010 a las 09:17 -0300, Esteban Bordon escribió:
> > The script try to connect to the Access Point that have the better
> > signal using iwlist, iwconfig and dhclient. If dhclient return 0 it
> > executes ip route to obtain the server IP and it download a few files.
>
> If you set all the access points in the school to the same ESSID, then
> clients will automatically connect to the AP with best signal and even
> switch to a different one if you move around (however, since background
> scanning is slow, you might loose association if you move around too
> quickly).
>
> Regarding the server ip, it would be cool if you could use the DNS. dhcp
> could configure one nameserver on the client and an automatic search
> domain. For example, in the school where I'm sitting now I get this in
> my /etc/resolv.conf:
>
> I know, we have in mind. The problem is that we have to impact that in 2500
servers and this may take a long time...



> > This script must to run before user takes control of the OS. My idea
> > is add the script at initrd but later.
>
> If the script runs before NetworkManager is started, you might manually
> configure the network like this:
>
>   ifconfig eth0 up
>   iwconfig eth0 essid $AP_ESSID key off
>   dhclient eth0
>
> If everything goes well, when dhclient exits you should have a valid,
> IP, route and DNS.
>

The script does that, and set some delay after each command but I haven't IP
and route. I understand why doesn't work if it worked in older versions.
The script does something like this:

  ifconfig eth0 up
  iwconfig eth0 mode managed
  sleep 1
  iwconfig eth0 channel $AP_CHANNEL
  sleep 3
  iwconfig eth0 essid $AP_ESSID
  killall dhclient > /dev/null 2>&1
  sleep 3
  dhclient eth0 -T 20 > /dev/null 2>&1


> --
>    // Bernie Innocenti - http://codewiz.org/
>  \X/  Sugar Labs       - http://sugarlabs.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/dextrose/attachments/20100811/9124523e/attachment.htm 


More information about the Dextrose mailing list