aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authoracid-burn <acid-burn@opendreambox.org>2011-03-17 09:46:35 +0100
committeracid-burn <acid-burn@opendreambox.org>2011-03-17 09:46:35 +0100
commit7911822c34874eac5c64bef3fddca0147f53d26b (patch)
tree15aa46028a39911e2609df324757da699cb6d50d /lib/python/Components
parentb01bf73f4857b2a1facaaf1fe556459676fe01e0 (diff)
downloadenigma2-7911822c34874eac5c64bef3fddca0147f53d26b.tar.gz
enigma2-7911822c34874eac5c64bef3fddca0147f53d26b.zip
Network.py: fix post-down->pre-down change introduced with last changes. refs #724
Diffstat (limited to 'lib/python/Components')
-rwxr-xr-xlib/python/Components/Network.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py
index 0a011236..04511d25 100755
--- a/lib/python/Components/Network.py
+++ b/lib/python/Components/Network.py
@@ -88,7 +88,7 @@ class Network:
def IPaddrFinished(self, result, retval, extra_args):
(iface, callback ) = extra_args
- data = { 'up': False, 'dhcp': False, 'preup' : False, 'postdown' : False }
+ data = { 'up': False, 'dhcp': False, 'preup' : False, 'predown' : False }
globalIPpattern = re_compile("scope global")
ipRegexp = '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
netRegexp = '[0-9]{1,2}'
@@ -174,7 +174,8 @@ class Network:
fp.write(iface["configStrings"])
if iface["preup"] is not False and not iface.has_key("configStrings"):
fp.write(iface["preup"])
- fp.write(iface["postdown"])
+ if iface["predown"] is not False and not iface.has_key("configStrings"):
+ fp.write(iface["predown"])
fp.write("\n")
fp.close()
self.writeNameserverConfig()
@@ -225,9 +226,9 @@ class Network:
if (split[0] == "pre-up"):
if self.ifaces[currif].has_key("preup"):
self.ifaces[currif]["preup"] = i
- if (split[0] == "post-down"):
- if self.ifaces[currif].has_key("postdown"):
- self.ifaces[currif]["postdown"] = i
+ if (split[0] in ("pre-down","post-down")):
+ if self.ifaces[currif].has_key("predown"):
+ self.ifaces[currif]["predown"] = i
for ifacename, iface in ifaces.items():
if self.ifaces.has_key(ifacename):