Previous fix for ticket #3161 caused ipa-{server,dns}-install to
skip creation of reverse zone when running in unattended mode. Make
sure that reverse zone is created also in unattended mode (unless
--no-reverse is specified).

https://fedorahosted.org/freeipa/ticket/3161
From d9c06a5bb374962b004bd7f89e2b621eb9fefac7 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Fri, 19 Oct 2012 15:34:49 +0200
Subject: [PATCH] Create reverse zone in unattended mode

Previous fix for ticket #3161 caused ipa-{server,dns}-install to
skip creation of reverse zone when running in unattended mode. Make
sure that reverse zone is created also in unattended mode (unless
--no-reverse is specified).

https://fedorahosted.org/freeipa/ticket/3161
---
 install/tools/ipa-dns-install    | 4 +++-
 install/tools/ipa-server-install | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index b0c20c533d559477d4906195a787fda95a61902e..71592d4899d702606b33e0ac89592d91f99c5e29 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -213,7 +213,9 @@ def main():
     else:
         reverse_zone = bindinstance.find_reverse_zone(ip)
         if reverse_zone is None and not options.no_reverse:
-            if not options.unattended and bindinstance.create_reverse():
+            if options.unattended:
+                reverse_zone = util.get_reverse_zone_default(ip)
+            elif bindinstance.create_reverse():
                 reverse_zone = util.get_reverse_zone_default(ip)
                 reverse_zone = bindinstance.read_reverse_zone(reverse_zone, ip)
 
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index cc25fb85500b6a97e71c822a882cf6f2aca4f0a0..6d1e6998ca4accbcf3900d5f97f889290e330c6b 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -816,7 +816,9 @@ def main():
         if options.reverse_zone:
             reverse_zone = bindinstance.normalize_zone(options.reverse_zone)
         elif not options.no_reverse:
-            if not options.unattended and bindinstance.create_reverse():
+            if options.unattended:
+                reverse_zone = util.get_reverse_zone_default(ip)
+            elif bindinstance.create_reverse():
                 reverse_zone = util.get_reverse_zone_default(ip)
                 reverse_zone = bindinstance.read_reverse_zone(reverse_zone, ip)
 
-- 
1.7.11.7

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

Reply via email to