summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_network.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-08-30 22:24:02 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-08-30 22:24:02 (GMT)
commitc4bd4457b5d640e1c8f5afbca7cd54c53691e5fc (patch)
treef4e4f7a91e1d9d90033fd99d89e5e26a2c144528 /abs/core/LinHES-config/mv_network.py
parent0e7b327a1ae444233f1308a95420f70540ad74a3 (diff)
downloadlinhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.zip
linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.gz
linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.bz2
RSYNC CORE:
resync core-testing -> core Signed-off-by: James Meyer <james.meyer@operamail.com>
Diffstat (limited to 'abs/core/LinHES-config/mv_network.py')
-rwxr-xr-xabs/core/LinHES-config/mv_network.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/abs/core/LinHES-config/mv_network.py b/abs/core/LinHES-config/mv_network.py
index b80e4cc..f256785 100755
--- a/abs/core/LinHES-config/mv_network.py
+++ b/abs/core/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"]
@@ -482,6 +482,9 @@ def hostname_change_check(systemconfig):
def setup_network (systemconfig,this_is_install):
+ if mv_common.read_config(mv_common.module_config,"network") == False :
+ logging.info("____Skipping of network, config disabled____")
+ return False
logging.info("____Start of network____")
logging.info(" Setting up the network")
restartfe = hostname_change_check(systemconfig)