diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-01-04 08:55:47 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2011-01-07 05:05:54 -0500 |
commit | 9232a478773ea06f31938d3d202a15d91c58034e (patch) | |
tree | f5887cdf0feeb3fb8f5835cb7f8c8723efe28a4e /install/tools/ipa-server-install | |
parent | 8a9fdbfb039bf1894cf3b301c8a0f84261ec8c1c (diff) | |
download | freeipa-9232a478773ea06f31938d3d202a15d91c58034e.tar.gz freeipa-9232a478773ea06f31938d3d202a15d91c58034e.tar.xz freeipa-9232a478773ea06f31938d3d202a15d91c58034e.zip |
Create the reverse zone by default
A new option to specify reverse zone creation for unattended installs
https://fedorahosted.org/freeipa/ticket/678
Diffstat (limited to 'install/tools/ipa-server-install')
-rwxr-xr-x | install/tools/ipa-server-install | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 19f80a79..173f5c25 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -99,6 +99,8 @@ def parse_options(): help="Add a DNS forwarder") parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true", default=False, help="Do not add any DNS forwarders, use root servers instead") + parser.add_option("--no-reverse", dest="no_reverse", action="store_true", + default=False, help="Do not create reverse DNS zone") parser.add_option("--zonemgr", dest="zonemgr", help="DNS zone manager e-mail address. Defaults to root") parser.add_option("-U", "--unattended", dest="unattended", action="store_true", @@ -142,6 +144,8 @@ def parse_options(): parser.error("You cannot specify a --forwarder option without the --setup-dns option") if options.no_forwarders: parser.error("You cannot specify a --no-forwarders option without the --setup-dns option") + if options.no_reverse: + parser.error("You cannot specify a --no-reverse option without the --setup-dns option") elif options.forwarders and options.no_forwarders: parser.error("You cannot specify a --forwarder option together with --no-forwarders") @@ -545,7 +549,7 @@ def main(): master_password = "" dm_password = "" admin_password = "" - create_reverse = False + create_reverse = True # check bind packages are installed if options.setup_dns: @@ -837,7 +841,13 @@ def main(): # Create a BIND instance bind = bindinstance.BindInstance(fstore, dm_password) if options.setup_dns: - create_reverse = bindinstance.create_reverse(options.unattended) + if options.unattended: + # In unattended mode just use the cmdline flag + create_reverse = not options.no_reverse + elif not options.no_reverse: + # In interactive mode, if the flag was not explicitly specified, ask the user + create_reverse = bindinstance.create_reverse() + bind.setup(host_name, ip_address, realm_name, domain_name, dns_forwarders, options.conf_ntp, create_reverse, zonemgr=options.zonemgr) if options.setup_dns: api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password) |