summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/mv_network.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-03-27 17:31:02 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-03-27 17:31:02 (GMT)
commita2c0883f206547f76d207a8477afc82a07cf0a30 (patch)
tree29c26ca9566af8ae9d5c3a59d8a166a62b017be3 /abs/core-testing/LinHES-config/mv_network.py
parentcceca5ba2acd5477cc59b01a7a2336d3a53d7fe1 (diff)
downloadlinhes_pkgbuild-a2c0883f206547f76d207a8477afc82a07cf0a30.zip
linhes_pkgbuild-a2c0883f206547f76d207a8477afc82a07cf0a30.tar.gz
linhes_pkgbuild-a2c0883f206547f76d207a8477afc82a07cf0a30.tar.bz2
linhes-config: correct error when writing out /etc/hosts. it's best to append instead of overwrite
closes #666
Diffstat (limited to 'abs/core-testing/LinHES-config/mv_network.py')
-rwxr-xr-xabs/core-testing/LinHES-config/mv_network.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/abs/core-testing/LinHES-config/mv_network.py b/abs/core-testing/LinHES-config/mv_network.py
index b80e4cc..2a55c63 100755
--- a/abs/core-testing/LinHES-config/mv_network.py
+++ b/abs/core-testing/LinHES-config/mv_network.py
@@ -50,7 +50,7 @@ def get_ip(ifname):
)[20:24])
def get_default_route(iface):
- rcroute = "127.0.0.1"
+ rcroute = "127.0.0.1"
f = open ('/proc/net/route', 'r')
for line in f:
words = string.split (line)
@@ -107,7 +107,7 @@ def setup_MTYH_DNS():
for line in f:
if line.startswith("nameserver"):
print line
- returndns = line.split()[1]
+ returndns = line.split()[1]
break
except:
logging.debug(" Couldn't open /etc/resolv.conf for myth_dns")
@@ -158,7 +158,7 @@ def setup_hostname(systemconfig):
except:
logging.critical(" *Hostname could not be set")
logging.info(" Using default value of me")
- hostname = "me"
+ hostname = "diamonds"
logging.info(" Setting the hostname to %s", hostname)
cmd = ''' echo %s > /etc/hostname ''' %hostname
mv_common.runcmd(cmd)
@@ -168,7 +168,7 @@ def setup_hostname(systemconfig):
logging.debug(" not using dhcp")
cmd = ''' echo 127.0.0.1 localhost > /etc/hosts '''
mv_common.runcmd(cmd)
- cmd = ''' echo %s %s > /etc/hosts ''' %(systemconfig["mythip"], systemconfig["hostname"])
+ cmd = ''' echo %s %s >> /etc/hosts ''' %(systemconfig["mythip"], systemconfig["hostname"])
mv_common.runcmd(cmd)
else:
cmd = ''' echo 127.0.0.1 %s localhost > /etc/hosts ''' %systemconfig["hostname"]