summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-02-17 21:21:59 +0000
committerErik Troan <ewt@redhat.com>2000-02-17 21:21:59 +0000
commit3126b588a01aea42a8bed2650fdf7836154d6b5d (patch)
tree0aaae01caf8be68e3d248450302da1a8746ac6f7 /todo.py
parent7997696eb9dce87a92e8501359201ab76544ec0b (diff)
downloadanaconda-3126b588a01aea42a8bed2650fdf7836154d6b5d.tar.gz
anaconda-3126b588a01aea42a8bed2650fdf7836154d6b5d.tar.xz
anaconda-3126b588a01aea42a8bed2650fdf7836154d6b5d.zip
turn on networking to lookup hostname, if necessary
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/todo.py b/todo.py
index f828d3eb7..81a21ccab 100644
--- a/todo.py
+++ b/todo.py
@@ -131,6 +131,15 @@ class Network:
def lookupHostname (self):
# can't look things up if they don't exist!
+ if not self.isConfigured:
+ for dev in self.netdevices.values():
+ if dev.get('bootproto'):
+ self.primaryNS = isys.pumpNetDevice(dev.get('device'))
+ elif dev.get('ipaddr') and dev.get('netmask'):
+ isys.configNetDevice(dev.get('device'),
+ dev.get('ipaddr'), dev.get('netmask'),
+ self.gateway)
+
if not self.primaryNS: return
f = open("/etc/resolv.conf", "w")