Comment 3 for bug 415719

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

What is in /sys/class/net/wlan0/ on your system? I'm surprised the wireless directory is missing.

The detection code could get moved to the backends. Right now it lives in wnettools.py right now because checking for a directory on the filesystem is pretty quick, and it just gets run twice at start up time (once for wired, once for wireless), so I didn't bother with an ioctl implementation for it.

Re: the default interface name not getting used, now that you mention it, we probably shouldn't be filling in a default interface at all. It will likely cause issues if we try to use a wireless interface we didn't actually detect and that probably doesn't exist.

I don't think removing the str() call from the return value of DetectWirelessInterface()/DetectWiredInterface() will work correctly unless you convert None to an empty string first. D-Bus can't return NoneType.

I think a warning should be getting logged when we don't detect a wireless interface. Bubbling it up to the GUI might get annoying for users who really don't have a wireless interface. Actually, that code gets executed so early in the daemon startup sequence that the UI probably won't even be running yet. We don't really have a system for queuing up messages in the daemon to send to the UI right now, so any signal we sent indicating the failure to detect the interface would likely be lost anyway. It's something to consider for wicd 2.0, though.