summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-replica-manage
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-09-17 13:13:42 -0600
committerRob Crittenden <rcritten@redhat.com>2008-10-13 14:15:18 -0400
commitb8f46b1ceecf9d2fb44dba68394fee8f435c8755 (patch)
tree83ef2f82905ae7a3178fc63da2e5e0a4f5f61978 /ipa-server/ipa-install/ipa-replica-manage
parent5cfd84756b04ed603bb72643857faa9988b441fc (diff)
downloadfreeipa-b8f46b1ceecf9d2fb44dba68394fee8f435c8755.tar.gz
freeipa-b8f46b1ceecf9d2fb44dba68394fee8f435c8755.tar.xz
freeipa-b8f46b1ceecf9d2fb44dba68394fee8f435c8755.zip
fix issues brought up by initial review of ipa winsync enhancements
Diffstat (limited to 'ipa-server/ipa-install/ipa-replica-manage')
-rw-r--r--ipa-server/ipa-install/ipa-replica-manage20
1 files changed, 13 insertions, 7 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-manage b/ipa-server/ipa-install/ipa-replica-manage
index 2021eab68..c8e573504 100644
--- a/ipa-server/ipa-install/ipa-replica-manage
+++ b/ipa-server/ipa-install/ipa-replica-manage
@@ -93,19 +93,25 @@ def del_master(replman, hostname):
def add_master(replman, hostname, options):
other_args = {}
- if options.winsync:
- # these are the parameters required to create a winsync agreement
- other_args['winsync'] = True
- if options.port:
- other_args['port'] = options.port
+ if options.port:
+ other_args['port'] = options.port
+ if options.binddn:
other_args['binddn'] = options.binddn
+ if options.bindpw:
other_args['bindpw'] = options.bindpw
+ if options.cacert:
other_args['cacert'] = options.cacert
- # have to install the windows ca cert before doing anything else
+ if options.winsync:
+ other_args['winsync'] = True
+ if not options.binddn or not options.bindpw or not options.cacert:
+ logging.error("The arguments --binddn, --bindpw, and --cacert are required to create a winsync agreement")
+ sys.exit(1)
+ if options.cacert:
+ # have to install the given CA cert before doing anything else
ds = dsinstance.DsInstance(realm_name = get_realm_name(),
dm_password = replman.dirman_passwd)
if not ds.add_ca_cert(options.cacert):
- logging.error("Could not load the required CA certificate file [%s] - cannot add winsync agreement" %
+ logging.error("Could not load the required CA certificate file [%s]" %
options.cacert)
sys.exit(1)
# have to reconnect replman connection since the directory server was restarted