FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 08-17-2010, 10:43 AM
Radek Vykydal
 
Default Don't touch resolv.conf which is handled by NM (#622927)

Anaconda would only corrupt resolv.conf, e.g. in case of: DHCP install,
hostname without dots set by user, fqdn with domain obtained from this
hostname with socket.getfqdn => resolv.conf is missing domain and
nameserver values.

---
pyanaconda/network.py | 43 +------------------------------------------
1 files changed, 1 insertions(+), 42 deletions(-)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index b65d350..9e2d828 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -367,7 +367,6 @@ class Network:

self.netdevices = {}
self.ksdevice = None
- self.domains = []

# populate self.netdevices
devhash = isys.getDeviceProperties(dev=None)
@@ -380,8 +379,6 @@ class Network:
device.path)
continue

- if device.get('DOMAIN'):
- self.domains.append(device.get('DOMAIN'))
# TODORV - the last iface in loop wins, might be ok,
# not worthy of special juggling
if device.get('HOSTNAME'):
@@ -719,45 +716,7 @@ class Network:
f.close()
shutil.move(newnetwork, networkConfFile)

- # If the hostname was not looked up, but typed in by the user,
- # domain might not be computed, so do it now.
- domainname = None
- if "." in self.hostname:
- fqdn = self.hostname
- else:
- fqdn = socket.getfqdn(self.hostname)
-
- if fqdn in [ "localhost.localdomain", "localhost",
- "localhost6.localdomain6", "localhost6",
- self.hostname ] or "." not in fqdn:
- fqdn = None
-
- if fqdn:
- domainname = fqdn.split('.', 1)[1]
- if domainname in [ "localdomain", "localdomain6" ]:
- domainname = None
- else:
- domainname = None
-
- if self.domains == ["localdomain"] or not self.domains:
- if domainname:
- self.domains = [domainname]
-
- # /etc/resolv.conf
- if (self.domains != ['localdomain'] and self.domains) or
- self.hasNameServers(dev.info):
- resolv = "/etc/resolv.conf"
-
- f = open(resolv, "w")
-
- if self.domains != ['localdomain'] and self.domains:
- f.write("search %s
" % (string.joinfields(self.domains, ' '),))
-
- for key in dev.info.keys():
- if key.upper().startswith('DNS'):
- f.write("nameserver %s
" % (dev.get(key),))
-
- f.close()
+ # /etc/resolv.conf is managed by NM

# /etc/udev/rules.d/70-persistent-net.rules
rules = "/etc/udev/rules.d/70-persistent-net.rules"
--
1.7.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 02:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org