summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2009-09-28 23:34:15 -0400
committerJason Gerard DeRose <jderose@redhat.com>2009-09-28 22:17:01 -0600
commite4877c946f71b2d091d01edfd64768ce7a7a47ee (patch)
treef0d76c989a96765b6afbe189843cb1c6d2d45f5b /install/tools/ipa-replica-install
parent38a27b1c2f7750da1d6b75c7c2320762ca0f3d08 (diff)
downloadfreeipa-e4877c946f71b2d091d01edfd64768ce7a7a47ee.tar.gz
freeipa-e4877c946f71b2d091d01edfd64768ce7a7a47ee.tar.xz
freeipa-e4877c946f71b2d091d01edfd64768ce7a7a47ee.zip
Only initialize the API once in the installer
Make the ldap2 plugin schema loader ignore SERVER_DOWN errors 525303
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install20
1 files changed, 8 insertions, 12 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 1584dd58c..e8fabd705 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -32,7 +32,6 @@ from ipaserver.install import bindinstance, httpinstance, ntpinstance, certs
from ipaserver import ipaldap
from ipapython import version
from ipalib import api, util
-from ipalib.constants import DEFAULT_CONFIG
CACERT="/usr/share/ipa/html/ca.crt"
@@ -134,14 +133,6 @@ def install_ca(config):
# FIXME, need to pass along the CA plugin to use
cafile = config.dir + "/ca.p12"
- # Just initialize the environment. This is so the installer can have
- # access to the plugin environment
- api.env._bootstrap()
- default_config = dict(DEFAULT_CONFIG)
- if ipautil.file_exists(cafile):
- default_config['ra_plugin'] = 'dogtag'
- api.env._finalize_core(**default_config)
-
if not ipautil.file_exists(cafile):
return None
@@ -320,6 +311,14 @@ def main():
except ldap.INVALID_CREDENTIALS, e :
sys.exit("\nThe password provided is incorrect for LDAP server %s" % config.master_host_name)
+ if ipautil.file_exists(config.dir + "/ca.p12"):
+ ca_type = 'dogtag'
+ else:
+ ca_type = 'selfsign'
+
+ api.bootstrap(in_server=True, ra_plugin=ca_type)
+ api.finalize()
+
# Install CA cert so that we can do SSL connections with ldap
install_ca_cert(config)
@@ -379,9 +378,6 @@ def main():
service.restart("krb5kdc")
if options.setup_dns:
- # First bootstrap the plug-in framework
- api.bootstrap(in_server=True)
- api.finalize()
api.Backend.ldap2.connect(bind_dn="cn=Directory Manager",
bind_pw=config.dirman_password)