def configStrings(iface):
driver = iNetwork.detectWlanModule()
- print "WLAN-MODULE",driver
- if driver == 'ralink':
- return " pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -Dralink\n post-down wpa_cli terminate"
- if driver == 'madwifi':
+ print "Found WLAN-Driver:",driver
+ if driver in ('ralink', 'zydas'):
+ return " pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -D"+driver+"\n post-down wpa_cli terminate"
+ else:
if config.plugins.wlan.essid.value == "hidden...":
- return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.hiddenessid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate"
- return " pre-up iwconfig "+iface+" essid "+config.plugins.wlan.essid.value+"\n pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dmadwifi\n post-down wpa_cli terminate"
- if driver == 'zydas':
- return " pre-up /usr/sbin/wpa_supplicant -i"+iface+" -c/etc/wpa_supplicant.conf -B -dd -Dzydas\n post-down wpa_cli terminate"
+ return ' pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.hiddenessid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -D'+driver+'\n post-down wpa_cli terminate'
+ else:
+ return ' pre-up iwconfig '+iface+' essid "'+config.plugins.wlan.essid.value+'"\n pre-up /usr/sbin/wpa_supplicant -i'+iface+' -c/etc/wpa_supplicant.conf -B -dd -D'+driver+'\n post-down wpa_cli terminate'
def Plugins(**kwargs):
return PluginDescriptor(name=_("Wireless LAN"), description=_("Connect to a Wireless Network"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": callFunction, "configStrings": configStrings, "WlanPluginEntry": lambda x: "Wireless Network Configuartion..."})