summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2008-05-15 11:33:07 -0400
committerSimo Sorce <ssorce@redhat.com>2008-05-15 14:26:25 -0400
commit6119f83799a70738170e19f3e2d833fdf4ecbc86 (patch)
treedf600786309c2b32e4adb9a2234777728accc3df /ipa-server/ipa-install
parent58592c3b4f376a5387982607b39ba68ca887411d (diff)
downloadfreeipa-6119f83799a70738170e19f3e2d833fdf4ecbc86.tar.gz
freeipa-6119f83799a70738170e19f3e2d833fdf4ecbc86.tar.xz
freeipa-6119f83799a70738170e19f3e2d833fdf4ecbc86.zip
Use split instead of find as split does not fail to provide a complete
component if no '.' is found.
Diffstat (limited to 'ipa-server/ipa-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 a7fd30c3a..916527c9e 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