aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/NetworkSetup.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2007-03-19 18:56:16 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2007-03-19 18:56:16 +0000
commite7b3db898270e6a6a252eee7697302fb0c1f7d38 (patch)
tree93a0f06932d959a357aa74e09ecd83e33612a975 /lib/python/Screens/NetworkSetup.py
parent5d71f584400a4302a391289bca750cdc16ed58cb (diff)
downloadenigma2-e7b3db898270e6a6a252eee7697302fb0c1f7d38.tar.gz
enigma2-e7b3db898270e6a6a252eee7697302fb0c1f7d38.zip
plugins are now able to add device specific text to /etc/networking/interfaces
example: where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": callFunction, "configStrings": configStrings} with def PluginFunction(session, iface): session.open(<MainPlugin>, iface) def callFunction(iface): if <iface is supported by plugin>: return PluginFunction else: return None def configSrings(iface): return "# would add this to adapter iface into /etc/networking/interfaces"
Diffstat (limited to 'lib/python/Screens/NetworkSetup.py')
-rw-r--r--lib/python/Screens/NetworkSetup.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py
index 640da615..b4dbc639 100644
--- a/lib/python/Screens/NetworkSetup.py
+++ b/lib/python/Screens/NetworkSetup.py
@@ -138,9 +138,14 @@ class AdapterSetup(Screen, ConfigListScreen):
self.extended = None
for p in plugins.getPlugins(PluginDescriptor.WHERE_NETWORKSETUP):
- callFnc = p.__call__(self.iface)
+ callFnc = p.__call__["ifaceSupported"](self.iface)
if callFnc is not None:
self.extended = callFnc
+ print p.__call__
+ if p.__call__.has_key("configStrings"):
+ self.configStrings = p.__call__["configStrings"]
+ else:
+ self.configStrings = None
self.extendedSetup = getConfigListEntry(_('Extended Setup...'), NoSave(ConfigNothing()))
self.list.append(self.extendedSetup)
@@ -172,8 +177,12 @@ class AdapterSetup(Screen, ConfigListScreen):
iNetwork.setAdapterAttribute(self.iface, "gateway", self.gatewayConfigEntry.value)
else:
iNetwork.removeAdapterAttribute(self.iface, "gateway")
-
-
+
+ print "self.extended:", self.extended
+ print "self.configStrings:", self.configStrings
+ if self.extended is not None and self.configStrings is not None:
+ iNetwork.setAdapterAttribute(self.iface, "configStrings", self.configStrings(self.iface))
+
iNetwork.deactivateNetworkConfig()
iNetwork.writeNetworkConfig()
iNetwork.activateNetworkConfig()