do nothing when old and new service is equal
[enigma2.git] / lib / python / Components / Network.py
index 37af0c98a0e263c7e9977abffc1818fd99ef8140..6fbd99945e57c2eb71f1147696c9aaf3b66698f7 100644 (file)
@@ -1,5 +1,3 @@
-from Components.config import config, ConfigYesNo, ConfigIP, NoSave, ConfigSubsection, ConfigMAC
-
 import os
 import re
 from socket import *
@@ -95,7 +93,7 @@ class Network:
                return data
 
        def writeNetworkConfig(self):
-               fp = file('/etc/network/interfaces.tmp', 'w')
+               fp = file('/etc/network/interfaces', 'w')
                fp.write("# automatically generated by enigma 2\n# do NOT change manually!\n\n")
                fp.write("auto lo\n")
                fp.write("iface lo inet loopback\n\n")
@@ -134,7 +132,7 @@ class Network:
                interfaces = []
                # parse the interfaces-file
                try:
-                       fp = file('/etc/network/interfaces.tmp', 'r')
+                       fp = file('/etc/network/interfaces', 'r')
                        interfaces = fp.readlines()
                        fp.close()
                except:
@@ -190,7 +188,7 @@ class Network:
 
        def deactivateNetworkConfig(self):
                for iface in self.ifaces.keys():
-                       os.system("ip addr flush" + iface)
+                       os.system("ip addr flush " + iface)
                os.system("/etc/init.d/networking stop")
                os.system("killall -9 udhcpc")
                os.system("rm /var/run/udhcpc*")