[Sugar-devel] [PATCH sugar] about my computer, check wlan0 before eth0

Sascha Silbe sascha-ml-reply-to-2010-3 at silbe.org
Sat Nov 27 15:28:49 EST 2010


Excerpts from James Cameron's message of Thu Nov 25 00:14:34 +0100 2010:

> +    for netdev in ['wlan0', 'eth0']:

I don't like that we're hardcoding interface names. E.g. on my XO-1.5,
the interface is called wlan3 (because the installation was done on a
different machine and Debian uses a permanent MAC address -> device name
mapping). I also seem to remember that not all WLAN drivers use the
wlan%d convention (or eth%d), though that might have been fixed by now.

NetworkManager exports a list of network devices. While it doesn't
provide access to the firmware version (only driver name), we can at
least use it for enumerating all wireless interfaces.

Sascha

[1] http://projects.gnome.org/NetworkManager/developers/spec-08.html#org.freedesktop.NetworkManager
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101127/3385c14d/attachment.pgp>


More information about the Sugar-devel mailing list