GPRS / Wifi

Roland Mas lolando at debian.org
Sun Aug 10 13:10:10 CEST 2008


Mike Baroukh, 2008-08-10 12:43:49 +0200 :

>>
>> Putting scripts into /etc/network/if-up.d would probably work.
>
> Not so easy :
> - you may have 2 places where the same interface has different
> parameters (wifi at home and wifi at work ...). So you can't just add
> "[pre|post]-up" parameters in /etc/network/interface.

Yes you can.  I do that on my laptop already: the scripts do the
detection of what Wifi access points are in the vicinity, and change
various parameters accordingly (WEP key, HTTP proxy, and I even used
to change the contents of /etc/apt/sources.list at some point).

> - Not so easy to configure tangogps, maemo, wget, mail client, ...

  Because they use different configuration schemes, I guess.  As for
Tangogps, I think you can already change the configuration with
gconftool-2.  As for the others, I don't know.

> Thats why I think that place parameters should be part of the framework
> and not just scripting.
> Application then could be compiled for the framework and using shared
> informations on how to connect.

  That looks like overkill to me.  Why add more complexity to the
framework when you already have a $http_proxy environment variable?

> Finally, connection parameters should not be part of the system.
> They are part of my profiles => they don't ahve to be in
> /etc/network/interface.

  And on that point, I wholeheartedly disagree.  Down that way lies
madness, and application-specific parameters, and a whole mess of
synchronisation problems and hard-to-debug stuff.

> Personnaly, to connect wifi, I prefer to use a script like
>
> INTERFACE=eth0
> ifconfig $INTERFACE up
> iwconfig $INTERFACE essid <myessid>
> iwconfig $INTERFACE mode managed
> iwconfig $INTERFACE channel 7
> iwconfig $INTERFACE key open <my wep key>
> udhcpc -i eth0

  I prefer using just "ifup eth1" and have pre/post scripts in
/etc/network/interfaces or /etc/network/*.d, but that's a matter of
taste.

Roland.
-- 
Roland Mas

- Ogenki desuka, yau de poêle ?
- Genki desu, ture en zinc.




More information about the community mailing list