git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix seekable status when service is already running, only show infobar if InfoBarShow...
[enigma2.git]
/
lib
/
python
/
Components
/
Network.py
diff --git
a/lib/python/Components/Network.py
b/lib/python/Components/Network.py
index 884f97cd48540fc59c3dc6e1d21f64a998f606eb..a8c75907ddfff25639306f3478c744fb23ed25d2 100644
(file)
--- a/
lib/python/Components/Network.py
+++ b/
lib/python/Components/Network.py
@@
-95,7
+95,7
@@
class Network:
return data
def writeNetworkConfig(self):
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")
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")
@@
-113,6
+113,9
@@
class Network:
fp.write(" netmask %d.%d.%d.%d\n" % tuple(iface['netmask']))
if iface.has_key('gateway'):
fp.write(" gateway %d.%d.%d.%d\n" % tuple(iface['gateway']))
fp.write(" netmask %d.%d.%d.%d\n" % tuple(iface['netmask']))
if iface.has_key('gateway'):
fp.write(" gateway %d.%d.%d.%d\n" % tuple(iface['gateway']))
+
+ if iface.has_key("configStrings"):
+ fp.write("\n" + iface["configStrings"] + "\n")
fp.write("\n")
fp.close()
self.writeNameserverConfig()
fp.write("\n")
fp.close()
self.writeNameserverConfig()
@@
-131,7
+134,7
@@
class Network:
interfaces = []
# parse the interfaces-file
try:
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:
interfaces = fp.readlines()
fp.close()
except:
@@
-187,7
+190,7
@@
class Network:
def deactivateNetworkConfig(self):
for iface in self.ifaces.keys():
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*")
os.system("/etc/init.d/networking stop")
os.system("killall -9 udhcpc")
os.system("rm /var/run/udhcpc*")
@@
-211,6
+214,7
@@
class Network:
return None
def setAdapterAttribute(self, iface, attribute, value):
return None
def setAdapterAttribute(self, iface, attribute, value):
+ print "setting for adapter", iface, "attribute", attribute, " to value", value
if self.ifaces.has_key(iface):
self.ifaces[iface][attribute] = value
if self.ifaces.has_key(iface):
self.ifaces[iface][attribute] = value