diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-10-14 14:05:07 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-10-13 21:24:07 -0400 |
commit | 470576a832b0cbb35a2ebdd565dca793f2c86b00 (patch) | |
tree | 3c4402a59b3ed16ba91308dbacae010ba991e712 /ipa-client/ipa-install/ipa-client-install | |
parent | 814a424a37c715f0fd14e88282271d29d3d1fd94 (diff) | |
download | freeipa-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-x | ipa-client/ipa-install/ipa-client-install | 13 |
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: |