summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-replica-manage
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-11-10 17:08:22 -0500
committerRob Crittenden <rcritten@redhat.com>2008-11-12 15:52:51 -0500
commit49e4876ba9143e4e63d8ed53da812627ebbb28c7 (patch)
tree097c968ae3bdefd2c296902192772505c1a66051 /ipa-server/ipa-install/ipa-replica-manage
parent892907515065e5bf411387f83511028c482ab8d8 (diff)
downloadfreeipa-49e4876ba9143e4e63d8ed53da812627ebbb28c7.tar.gz
freeipa-49e4876ba9143e4e63d8ed53da812627ebbb28c7.tar.xz
freeipa-49e4876ba9143e4e63d8ed53da812627ebbb28c7.zip
Fix deleting a winsync replication agreement.
Diffstat (limited to 'ipa-server/ipa-install/ipa-replica-manage')
-rwxr-xr-x[-rw-r--r--]ipa-server/ipa-install/ipa-replica-manage13
1 files changed, 8 insertions, 5 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-manage b/ipa-server/ipa-install/ipa-replica-manage
index 8ba4427b..9b46748e 100644..100755
--- 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 = {}