https://fedorahosted.org/freeipa/ticket/2161

The option '--no-reverse' was not honoured in replica-install because of
wrongly placed condition checking.

--
Regards,

Ondrej Hamada
FreeIPA team
jabber: oh...@jabbim.cz
IRC: ohamada

From 5aa9a2238ee5c32aeebf3c2cabc6aa5c31794822 Mon Sep 17 00:00:00 2001
From: Ondrej Hamada <oham...@redhat.com>
Date: Wed, 25 Jan 2012 16:53:01 +0100
Subject: [PATCH] Honor no-reverse option on replica

The option '--no-reverse' was not honored in replica-install because of
wrongly placed condition checking.

https://fedorahosted.org/freeipa/ticket/2161
---
 install/tools/ipa-replica-install |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index c1474ecbffc6ac5ccc22b91098dbdb1aa4613f0f..4df7b5c0152e2462fae8667e7108cce891f33ef2 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -206,11 +206,14 @@ def install_bind(config, options):
             sys.exit(1)
         reverse_zone = bindinstance.normalize_zone(options.reverse_zone)
     else:
-        reverse_zone = bindinstance.find_reverse_zone(config.ip)
-        if reverse_zone is None and not options.no_reverse:
-            reverse_zone = bindinstance.get_reverse_zone_default(config.ip)
-            if not options.unattended and bindinstance.create_reverse():
-                reverse_zone = bindinstance.read_reverse_zone(reverse_zone, config.ip)
+        if not options.no_reverse:
+            reverse_zone = bindinstance.find_reverse_zone(config.ip)
+            if reverse_zone is None:
+                reverse_zone = bindinstance.get_reverse_zone_default(config.ip)
+                if not options.unattended and bindinstance.create_reverse():
+                    reverse_zone = bindinstance.read_reverse_zone(reverse_zone, config.ip)
+        else:
+            reverse_zone = None
 
     if reverse_zone is not None:
         print "Using reverse zone %s" % reverse_zone
-- 
1.7.6.5

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to