From b73e0cd233d240265103e50bba4937f17cc52351 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 10 Nov 2008 17:08:22 -0500 Subject: Fix deleting a winsync replication agreement. --- ipa-server/ipa-install/ipa-replica-manage | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) mode change 100644 => 100755 ipa-server/ipa-install/ipa-replica-manage (limited to 'ipa-server/ipa-install/ipa-replica-manage') diff --git a/ipa-server/ipa-install/ipa-replica-manage b/ipa-server/ipa-install/ipa-replica-manage old mode 100644 new mode 100755 index 8ba4427ba..9b46748e3 --- a/ipa-server/ipa-install/ipa-replica-manage +++ b/ipa-server/ipa-install/ipa-replica-manage @@ -93,12 +93,15 @@ def list_masters(replman, verbose): print " last update ended: %s" % str(ipautil.parse_generalized_time(entry.nsds5replicalastupdateend)) def del_master(replman, hostname): - dirman_passwd = getpass.getpass("Directory Manager password (%s): " % hostname) - other_replman = replication.ReplicationManager(hostname, dirman_passwd) - other_replman.suffix = get_suffix() + t = replman.get_agreement_type(hostname) - replman.delete_agreement(other_replman.conn) - other_replman.delete_agreement(replman.conn) + if t == replication.IPA_REPLICA: + dirman_passwd = getpass.getpass("Directory Manager password (%s): " % hostname) + other_replman = replication.ReplicationManager(hostname, dirman_passwd) + other_replman.suffix = get_suffix() + other_replman.delete_agreement(replman.conn.host) + + replman.delete_agreement(hostname) def add_master(replman, hostname, options): other_args = {} -- cgit