From 90ac36c780d6e5d0bcb26f8c7f153d35af1db70f Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mon, 4 Nov 2013 17:15:23 +0200 Subject: [PATCH] Guard import of adtrustinstance for case without trusts https://fedorahosted.org/freeipa/ticket/4011 --- install/tools/ipa-server-install | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index b3dcf6d93a70e2910a3d7fa62139efbf640d1cbe..458ebba550d0fe7675bd874e23c7d730c53297e6 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -40,7 +40,12 @@ import pwd import textwrap from optparse import OptionGroup, OptionValueError -from ipaserver.install import adtrustinstance +try: + from ipaserver.install import adtrustinstance + _server_trust_ad_installed = True +except ImportError: + _server_trust_ad_installed = False + from ipaserver.install import dsinstance from ipaserver.install import krbinstance from ipaserver.install import bindinstance @@ -493,7 +498,8 @@ def uninstall(): httpinstance.HTTPInstance(fstore).uninstall() krbinstance.KrbInstance(fstore).uninstall() dsinstance.DsInstance(fstore=fstore).uninstall() - adtrustinstance.ADTRUSTInstance(fstore).uninstall() + if _server_trust_ad_installed: + adtrustinstance.ADTRUSTInstance(fstore).uninstall() memcacheinstance.MemcacheInstance().uninstall() otpdinstance.OtpdInstance().uninstall() ipaservices.restore_network_configuration(fstore, sstore) -- 1.8.3.1