aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Network.py
diff options
context:
space:
mode:
authorAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-27 09:21:56 +0000
committerAndreas Frisch <andreas.frisch@multimedia-labs.de>2008-10-27 09:21:56 +0000
commit4690ebce3b552f8c5fd45cd3ad773444d7355038 (patch)
tree40c7a387ac6ac570a040115a38b21d32e0a3cded /lib/python/Components/Network.py
parentaed917161dda79ec6a53e20dbf0ee00a1affc4c0 (diff)
downloadenigma2-4690ebce3b552f8c5fd45cd3ad773444d7355038.tar.gz
enigma2-4690ebce3b552f8c5fd45cd3ad773444d7355038.zip
changes on behalf of acid-burn
Diffstat (limited to 'lib/python/Components/Network.py')
-rw-r--r--lib/python/Components/Network.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py
index c28710b7..56506a50 100644
--- a/lib/python/Components/Network.py
+++ b/lib/python/Components/Network.py
@@ -88,9 +88,9 @@ class Network:
data['mac'] = mac
if not data.has_key('ip'):
data['dhcp'] = True
- data['ip'] = [192, 168, 1, 2]
- data['netmask'] = [255, 255, 255, 0]
- data['gateway'] = [192, 168, 1, 1]
+ data['ip'] = [0, 0, 0, 0]
+ data['netmask'] = [0, 0, 0, 0]
+ data['gateway'] = [0, 0, 0, 0]
fp = popen("route -n | grep " + iface)
result = fp.readlines()
@@ -177,9 +177,11 @@ class Network:
if self.ifaces[currif]["gateway"] != ifaces[currif]["gateway"] and ifaces[currif]["dhcp"] == False:
self.ifaces[currif]["gateway"] = map(int, split[1].split('.'))
if (split[0] == "pre-up"):
- self.ifaces[currif]["preup"] = i
+ if self.ifaces[currif].has_key("preup"):
+ self.ifaces[currif]["preup"] = i
if (split[0] == "post-down"):
- self.ifaces[currif]["postdown"] = i
+ if self.ifaces[currif].has_key("postdown"):
+ self.ifaces[currif]["postdown"] = i
print "read interfaces:", ifaces
for ifacename, iface in ifaces.items():
@@ -332,6 +334,12 @@ class Network:
self.container.appClosed.get().remove(self.cmdFinished)
self.container.dataAvail.get().remove(self.dataAvail)
+ def stopContainer(self):
+ self.container.kill()
+
+ def ContainerRunning(self):
+ return self.container.running()
+
def checkforInterface(self,iface):
if self.getAdapterAttribute(iface, 'up') is True:
return True