[PATCH rhel5-branch] Do not add unresolvable hostname to 127.0.0.1 of /etc/hosts (#750681)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we do not for resolvable.

Resolves: rhbz#750681

Selected points from history of /etc/hosts file management:
RHEL 5: bug #210050
RHEL 6: bug #530343
NetworkManager: bug #648725
---
 network.py |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/network.py b/network.py
index b9b5d14..00d189d 100644
--- a/network.py
+++ b/network.py
@@ -588,13 +588,6 @@ class Network:
 
         ip = self.lookupHostname()
 
-        # If the hostname is not resolvable, tie it to 127.0.0.1
-        if not ip and self.hostname != "localhost.localdomain":
-            localline += self.hostname + " "
-            l = string.split(self.hostname, ".")
-            if len(l) > 1:
-                localline += l[0] + " "
-
         localline += "localhost.localdomain localhost\n"
         f.write("# Do not remove the following line, or various programs\n")
         f.write("# that require network functionality will fail.\n")
-- 
1.7.4

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


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux