summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-04-26 19:07:46 +0000
committerJeremy Katz <katzj@redhat.com>2006-04-26 19:07:46 +0000
commit7c895b43a129cc104a0c714cde1dc210c0a7c02b (patch)
tree8aeed4ebc5144d00fb749b566c538621279104a3 /network.py
parenteec8d07d1d4575dc9900646aedfbe9abc10d9194 (diff)
downloadanaconda-7c895b43a129cc104a0c714cde1dc210c0a7c02b.tar.gz
anaconda-7c895b43a129cc104a0c714cde1dc210c0a7c02b.tar.xz
anaconda-7c895b43a129cc104a0c714cde1dc210c0a7c02b.zip
2006-04-26 Jeremy Katz <katzj@redhat.com>
* network.py (Network.lookupHostname): Don't change network config in rootpath mode (#185930)
Diffstat (limited to 'network.py')
-rw-r--r--network.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/network.py b/network.py
index 92c9ee3ee..64d9dd4b7 100644
--- a/network.py
+++ b/network.py
@@ -339,11 +339,12 @@ class Network:
log.warning("no network devices were available to look up host name")
return None
- f = open("/etc/resolv.conf", "w")
- f.write("nameserver %s\n" % myns)
- f.close()
- isys.resetResolv()
- isys.setResolvRetry(1)
+ if not flags.rootpath:
+ f = open("/etc/resolv.conf", "w")
+ f.write("nameserver %s\n" % myns)
+ f.close()
+ isys.resetResolv()
+ isys.setResolvRetry(1)
try:
ip = socket.gethostbyname(self.hostname)