summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-server-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-install/ipa-server-install')
-rw-r--r--ipa-server/ipa-install/ipa-server-install2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index a7fd30c3..916527c9 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -175,7 +175,7 @@ def read_ip_address(host_name):
fstore.backup_file("/etc/hosts")
hosts_fd = open('/etc/hosts', 'r+')
hosts_fd.seek(0, 2)
- hosts_fd.write(ip+'\t'+host_name+' '+host_name[:host_name.find('.')]+'\n')
+ hosts_fd.write(ip+'\t'+host_name+' '+host_name.split('.')[0]+'\n')
hosts_fd.close()
return ip