From 53afb67537f6be9712f2cb23fb021d204b5182b0 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 23 May 2008 14:51:50 -0400 Subject: Fix the case where domain != lower(REALM) add the domain to the ipa.conf file for apps that need to know This should fix a bug in the replica setup --- ipa-client/ipa-install/ipa-client-install | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'ipa-client') diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 54d7185a..17dd15a5 100644 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -202,23 +202,26 @@ def main(): return 1 # Configure ipa.conf - ipaconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer") - ipaconf.setOptionAssignment(" = ") - ipaconf.setSectionNameDelimiters(("[","]")) + if not options.on_master: + ipaconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer") + ipaconf.setOptionAssignment(" = ") + ipaconf.setSectionNameDelimiters(("[","]")) - opts = [{'name':'comment', 'type':'comment', 'value':'File modified by ipa-client-install'}, - {'name':'empty', 'type':'empty'}] + opts = [{'name':'comment', 'type':'comment', 'value':'File modified by ipa-client-install'}, + {'name':'empty', 'type':'empty'}] - #[defaults] - defopts = [{'name':'server', 'type':'option', 'value':cli_server}, - {'name':'realm', 'type':'option', 'value':cli_realm}] + #[defaults] + defopts = [{'name':'server', 'type':'option', 'value':cli_server}, + {'name':'realm', 'type':'option', 'value':cli_realm}, + {'name':'domain', 'type':'option', 'value':cli_domain}] - opts.append({'name':'defaults', 'type':'section', 'value':defopts}) - opts.append({'name':'empty', 'type':'empty'}) + opts.append({'name':'defaults', 'type':'section', 'value':defopts}) + opts.append({'name':'empty', 'type':'empty'}) + + fstore.backup_file("/etc/ipa/ipa.conf") + ipaconf.newConf("/etc/ipa/ipa.conf", opts) + print "Created /etc/ipa/ipa.conf" - fstore.backup_file("/etc/ipa/ipa.conf") - ipaconf.newConf("/etc/ipa/ipa.conf", opts) - print "Created /etc/ipa/ipa.conf" # Configure ldap.conf ldapconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer") -- cgit