summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-10-29 08:21:33 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-10-29 08:21:33 -1000
commit4eed53799fe8cc91e4065a4ddc9b5bab2a3e6ace (patch)
tree9d304a50fe0c7ea8e8c0126a53c25634539672a5
parentc88697452c8aa053d573d87fb7bbdb384c0417b0 (diff)
downloadanaconda-4eed53799fe8cc91e4065a4ddc9b5bab2a3e6ace.tar.gz
anaconda-4eed53799fe8cc91e4065a4ddc9b5bab2a3e6ace.tar.xz
anaconda-4eed53799fe8cc91e4065a4ddc9b5bab2a3e6ace.zip
Only copy /etc/resolv.conf if instPath != '/'
Fixes a traceback seen where network.py tries to copy /etc/resolv.conf to /etc/resolv.conf. The original fix was to get DNS working in %post scripts during kickstart installs, but that fix assumed that when were in this block, instPath would be something (such as /mnt/sysimage). Only copy when instPath is some value other than ''.
-rw-r--r--network.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/network.py b/network.py
index 19dfecdba..e7392cc09 100644
--- a/network.py
+++ b/network.py
@@ -657,7 +657,7 @@ class Network:
self.domains = [domainname]
# /etc/resolv.conf
- if os.path.isfile('/etc/resolv.conf'):
+ if os.path.isfile('/etc/resolv.conf') and instPath != '':
destresolv = "%s/etc/resolv.conf" % (instPath,)
shutil.copy('/etc/resolv.conf', destresolv)
elif (self.domains != ['localdomain'] and self.domains) or \