diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-10-29 08:21:33 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-10-29 08:21:33 -1000 |
commit | 4eed53799fe8cc91e4065a4ddc9b5bab2a3e6ace (patch) | |
tree | 9d304a50fe0c7ea8e8c0126a53c25634539672a5 /network.py | |
parent | c88697452c8aa053d573d87fb7bbdb384c0417b0 (diff) | |
download | anaconda-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 ''.
Diffstat (limited to 'network.py')
-rw-r--r-- | network.py | 2 |
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 \ |