summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-09-01 23:28:52 +0200
committerMartin Nagy <mnagy@redhat.com>2009-09-08 22:48:34 +0200
commitb519b87ea4f7ddd42001704f1583a1b3370bd0fc (patch)
tree52916c7ba4b395126a38dea507f1ba27b4850316 /install/tools/ipa-replica-install
parent6f37d139cb605ff569877999196550eb49156ed3 (diff)
downloadfreeipa-b519b87ea4f7ddd42001704f1583a1b3370bd0fc.tar.gz
freeipa-b519b87ea4f7ddd42001704f1583a1b3370bd0fc.tar.xz
freeipa-b519b87ea4f7ddd42001704f1583a1b3370bd0fc.zip
Add forgotten chunks from commit 4e5a68397a102f0be
I accidentally pushed the older patch that didn't contain bits for ipa-replica-install.
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install22
1 files changed, 20 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 7f0ec3283..0571f94c6 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -60,12 +60,26 @@ def parse_options():
help="Directory Manager (existing master) password")
parser.add_option("--setup-dns", dest="setup_dns", action="store_true",
default=False, help="configure bind with our zone")
+ parser.add_option("--forwarder", dest="forwarders", action="append",
+ 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")
options, args = parser.parse_args()
if len(args) != 1:
parser.error("you must provide a file generated by ipa-replica-prepare")
+ if not options.setup_dns:
+ if options.forwarders:
+ 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")
+ elif options.forwarders and options.no_forwarders:
+ parser.error("You cannot specify a --forwarder option together with --no-forwarders")
+ elif not options.forwarders and not options.no_forwarders:
+ parser.error("You must specify at least one --forwarder option or --no-forwarders option")
+
return options, args[0]
def get_dirman_password():
@@ -189,10 +203,14 @@ def install_http(config):
print "error copying files: " + str(e)
sys.exit(1)
-def install_bind(config):
+def install_bind(config, options):
+ if options.forwarders:
+ forwarders = options.forwarders
+ else:
+ forwarders = ()
bind = bindinstance.BindInstance(dm_password=config.dirman_password)
ip_address = resolve_host(config.host_name)
- bind.setup(config.host_name, ip_address, config.realm_name, config.domain_name)
+ bind.setup(config.host_name, ip_address, config.realm_name, config.domain_name, forwarders)
bind.create_instance()
def check_dirsrv():