diff options
Diffstat (limited to 'network.py')
-rw-r--r-- | network.py | 11 |
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) |