summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-24 13:39:56 +0000
committerMatt Wilson <msw@redhat.com>1999-08-24 13:39:56 +0000
commitc34d8542f676ebb6e8f4e0d6f7d8087f87578fed (patch)
tree8ab7b70ab6fe4d1bfa42370870d11b44db1e7ea3 /todo.py
parenta4336278fc64a0603d20640f43a955649a9b36d3 (diff)
downloadanaconda-c34d8542f676ebb6e8f4e0d6f7d8087f87578fed.tar.gz
anaconda-c34d8542f676ebb6e8f4e0d6f7d8087f87578fed.tar.xz
anaconda-c34d8542f676ebb6e8f4e0d6f7d8087f87578fed.zip
don't double up on localhost.localdomain
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/todo.py b/todo.py
index 3bd90490c..984d08545 100644
--- a/todo.py
+++ b/todo.py
@@ -678,7 +678,10 @@ class ToDo:
# /etc/hosts
f = open (self.instPath + "/etc/hosts", "w")
- f.write ("127.0.0.1\t\tlocalhost.localdomain " + self.network.hostname + "\n")
+ localline = "127.0.0.1\t\tlocalhost.localdomain "
+ if self.network.hostname != "localhost.localdomain":
+ localline = localline + self.network.hostname
+ f.write (localline + "\n")
for dev in self.network.netdevices.values ():
ip = dev.get ("ipaddr")
if dev.hostname and ip: