summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config/mv_network.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-01 20:22:46 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-01 20:22:46 (GMT)
commitaa8cbfddbec8df7338a629fd96e6cfce0bb64ed7 (patch)
tree4fffce1cf1702e0c6516e174e064fec86b2eb7a2 /abs/core-testing/LinHES-config/mv_network.py
parentb859b1baafe3d3a899c5f9c70a039327c57663e6 (diff)
downloadlinhes_pkgbuild-aa8cbfddbec8df7338a629fd96e6cfce0bb64ed7.zip
linhes_pkgbuild-aa8cbfddbec8df7338a629fd96e6cfce0bb64ed7.tar.gz
linhes_pkgbuild-aa8cbfddbec8df7338a629fd96e6cfce0bb64ed7.tar.bz2
LinHES-config: lineup debugging output
Diffstat (limited to 'abs/core-testing/LinHES-config/mv_network.py')
-rw-r--r--abs/core-testing/LinHES-config/mv_network.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/abs/core-testing/LinHES-config/mv_network.py b/abs/core-testing/LinHES-config/mv_network.py
index 71bc442..77ee2d8 100644
--- a/abs/core-testing/LinHES-config/mv_network.py
+++ b/abs/core-testing/LinHES-config/mv_network.py
@@ -13,7 +13,7 @@ def setup_MYTH_IP(systemconfig):
except:
logging.debug(" Error occured finding the defaultip")
defaultip = "127.0.0.1"
- logging.info(" Using %s as default ip", defaultip)
+ logging.debug(" Using %s as default ip", defaultip)
return defaultip
def setup_MYTH_DHCP(systemconfig):
@@ -23,7 +23,7 @@ def setup_MYTH_DHCP(systemconfig):
except:
logging.debug(" Error occured finding default dhcp")
defaultdhcp = "0"
- logging.info(" Using %s as dhcp value for %s", default_interface, defaultdhcp)
+ logging.debug(" Using %s as dhcp value for %s", default_interface, defaultdhcp)
return defaultdhcp
def flush(netdev):
@@ -51,13 +51,12 @@ def kill_dhcp(basedir):
def setup_nameserver(dns):
logging.info(" Adding %s for DNS", dns)
- logging.info("-----------NEED TO SETUP setup_nameserver")
- #grep -q $1 ${BASE}/etc/resolv.conf
- #status=$?
- #if [ ! $status = 0 ]
- #then
- #echo "nameserver $1" >> ${BASE}/etc/resolv.conf
- #fi
+ cmd = '''grep -q %s /etc/resolv.conf''' %dns
+ status = mv_common.runcmd(cmd)
+ if not status == 0 :
+ cmd = ''' echo "nameserver %s" >> /etc/resolv.conf ''' %dns
+ mv_common.runcmd(cmd)
+
def setup_hostname(systemconfig):
@@ -132,16 +131,16 @@ def setup_interface(netdev,systemconfig):
cmd = '''echo "key %s" >> %s/%s/iwconfig ''' %(netinfo["KEY"], etcnetdir, netdev)
mv_common.runcmd(cmd)
else:
- logging.info(" Disabling wireless extensions")
+ logging.info(" Disabling wireless extensions")
cmd = '''sed -i -e 's/^CONFIG_WIRLESS=.*$/CONFIG_WIRLESS=no/g' %s/%s/options''' %(etcnetdir, netdev)
mv_common.runcmd(cmd)
if netinfo["UseDHCP"] == "0" :
- logging.info(" Enabling DHCP support")
+ logging.info(" Enabling DHCP support")
cmd = ''' sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=dhcp/g' %s/%s/options''' %(etcnetdir, netdev)
mv_common.runcmd(cmd)
else:
- logging.info(" Using static ip address of %s",netinfo["ip"])
+ logging.info(" Using static ip address of %s",netinfo["ip"])
cmd = ''' sed -i -e 's/^BOOTPROTO=.*$/BOOTPROTO=static/g' %s/%s/options''' %(etcnetdir, netdev)
mv_common.runcmd(cmd)
cmd = '''echo "default via %s" > %s/%s/ipv4route''' %(netinfo["GW"], etcnetdir, netdev)
@@ -259,7 +258,7 @@ def setup_network (systemconfig):
logging.info(" Setting up the network")
setup_hostname(systemconfig)
find_active(systemconfig)
- logging.info("__End of network")
+ logging.info("__End of network\n")
@@ -272,6 +271,6 @@ def install_network_setup(systemconfig):
stop_network()
find_active(systemconfig)
start_network()
- logging.info("__End of network")
+ logging.info("__End of network install \n")