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