From 825d4fc9e7fc80e07a68daf35b5eb0c171e821af Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Mon, 13 Apr 2015 17:38:36 +0200 Subject: update 'api.env.ca_host' if a different hostname is used during server install https://fedorahosted.org/freeipa/ticket/4936 Reviewed-By: Petr Vobornik --- install/tools/ipa-server-install | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'install') diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index c74d15f8f..5c0431582 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -1158,9 +1158,6 @@ def main(): # Must be readable for everyone os.chmod(target_fname, 0644) - api.bootstrap(**cfg) - api.finalize() - if not options.unattended: print "" print "The following operations may take some minutes to complete." @@ -1172,6 +1169,12 @@ def main(): % (host_name, system_hostname)) # configure /etc/sysconfig/network to contain the custom hostname tasks.backup_and_replace_hostname(fstore, sstore, host_name) + # update `api.env.ca_host` to correct hostname + # https://fedorahosted.org/freeipa/ticket/4936 + api.env.ca_host = host_name + + api.bootstrap(**cfg) + api.finalize() # Create DS user/group if it doesn't exist yet dsinstance.create_ds_user() -- cgit