diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-27 03:57:04 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-12-27 03:57:04 +0000 |
| commit | 17e4d31f3f50abb51fa35bcfdfd04cfc73469d36 (patch) | |
| tree | 9771622f6c500f8c3bfb8d8f29202ba2c9a2cc87 /lib/python/Components | |
| parent | e40c611f0cf2653a48571f0081cf193ebfd2ffcf (diff) | |
| download | enigma2-17e4d31f3f50abb51fa35bcfdfd04cfc73469d36.tar.gz enigma2-17e4d31f3f50abb51fa35bcfdfd04cfc73469d36.zip | |
fix more very stupid bugs... someone must have had too much drinks while writing this code
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Network.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 8375d235..365e15f0 100644 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -21,6 +21,12 @@ class Network: fp.write(" gateway %d.%d.%d.%d\n" % tuple(config.network.gateway.value)) fp.close() + if config.network.dhcp.value == 0: + fp = file('/etc/resolv.conf', 'w') + fp.write("nameserver %d.%d.%d.%d\n" % tuple(config.network.dns.value)) + fp.close() + + def loadNetworkConfig(self): try: # parse the interfaces-file @@ -48,7 +54,7 @@ class Network: ifaces[currif]["gateway"] = map(int, split[1].split('.')) # parse the resolv.conf-file - fp = file('/etc/network/interfaces', 'r') + fp = file('/etc/resolv.conf', 'r') resolv = fp.readlines() fp.close() except: |
