summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-10-14 14:05:07 -0400
committerRob Crittenden <rcritten@redhat.com>2011-10-13 21:24:07 -0400
commit470576a832b0cbb35a2ebdd565dca793f2c86b00 (patch)
tree3c4402a59b3ed16ba91308dbacae010ba991e712 /ipa-client/ipa-install/ipa-client-install
parent814a424a37c715f0fd14e88282271d29d3d1fd94 (diff)
downloadfreeipa-470576a832b0cbb35a2ebdd565dca793f2c86b00.tar.gz
freeipa-470576a832b0cbb35a2ebdd565dca793f2c86b00.tar.xz
freeipa-470576a832b0cbb35a2ebdd565dca793f2c86b00.zip
If our domain is already configured in sssd.conf start with a new config.
https://fedorahosted.org/freeipa/ticket/1989
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install13
1 files changed, 12 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index feabf88d1..85d7867c4 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -680,10 +680,21 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options):
print "The old /etc/sssd/sssd.conf is backed up and will be restored during uninstall."
logging.error("Unable to parse existing SSSD config and --preserve-sssd was not specified: %s" % (str(e)))
logging.info("New SSSD config will be created")
+ del sssdconfig
sssdconfig = SSSDConfig.SSSDConfig()
sssdconfig.new_config()
- domain = sssdconfig.new_domain(cli_domain)
+ try:
+ domain = sssdconfig.new_domain(cli_domain)
+ except SSSDConfig.DomainAlreadyExistsError:
+ print "Domain %s is already configured in existing SSSD config, creating a new one." % cli_domain
+ print "The old /etc/sssd/sssd.conf is backed up and will be restored during uninstall."
+ logging.debug("Domain %s is already configured in existing SSSD config, creating a new one." % cli_domain)
+ del sssdconfig
+ sssdconfig = SSSDConfig.SSSDConfig()
+ sssdconfig.new_config()
+ domain = sssdconfig.new_domain(cli_domain)
+
domain.add_provider('ipa', 'id')
if not options.on_master: