From 1600146c942eedcbeb4f67537ee35d1e73c46b24 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 13 Dec 2010 14:28:11 -0500 Subject: Verify that the replication plugin exists before setting up replicas. ticket 502 --- ipaserver/install/replication.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ipaserver/install/replication.py') diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py index ed1badc1e..cdff50e7f 100644 --- a/ipaserver/install/replication.py +++ b/ipaserver/install/replication.py @@ -19,6 +19,7 @@ import time, logging +import os import ldap from ipaserver import ipaldap from ldap import modlist @@ -39,6 +40,19 @@ WINSYNC = 2 SASL_AUTH = ldap.sasl.sasl({}, 'GSSAPI') +def check_replication_plugin(): + """ + Confirm that the 389-ds replication is installed. + + Emit a message and return True/False + """ + if not os.path.exists('/usr/lib/dirsrv/plugins/libreplication-plugin.so') and \ + not os.path.exists('/usr/lib64/dirsrv/plugins/libreplication-plugin.so'): + print "The 389-ds replication plug-in was not found on this system" + return False + + return True + class ReplicationManager: """Manage replication agreements between DS servers, and sync agreements with Windows servers""" -- cgit