diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-11-10 17:08:22 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-11-12 15:54:38 -0500 |
commit | b73e0cd233d240265103e50bba4937f17cc52351 (patch) | |
tree | 097c968ae3bdefd2c296902192772505c1a66051 /ipa-server/ipa-install/ipa-replica-manage | |
parent | 00f42a236ef2b6a768597df754bbdc92925de558 (diff) | |
download | freeipa-b73e0cd233d240265103e50bba4937f17cc52351.tar.gz freeipa-b73e0cd233d240265103e50bba4937f17cc52351.tar.xz freeipa-b73e0cd233d240265103e50bba4937f17cc52351.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-manage | 13 |
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 8ba4427ba..9b46748e3 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 = {} |