summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_network.py
diff options
context:
space:
mode:
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)