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
This commit is contained in:
Martin Kosek committed 2012-10-19 16:19:14 +02:00
1 parent 4a97fd0601
commit 62cce24224
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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)