From 80b4b3d44bbbe745e644b56c5371ef5f4cda6600 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Fri, 27 May 2011 20:17:22 +0200 Subject: Parse netmasks in IP addresses passed to server install. ticket 1212 --- install/tools/ipa-replica-install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'install/tools/ipa-replica-install') diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install index 293a0a06c..6df512312 100755 --- a/install/tools/ipa-replica-install +++ b/install/tools/ipa-replica-install @@ -61,7 +61,7 @@ def parse_options(): 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") + type="ipaddr", 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", @@ -270,6 +270,8 @@ def install_bind(config, options): ip_address = resolve_host(config.host_name) if not ip_address: sys.exit("Unable to resolve IP address for host name") + ip = installutils.parse_ip_address(ip_address) + ip_address = str(ip) create_reverse = True if options.unattended: @@ -305,6 +307,8 @@ def install_dns_records(config, options): ip_address = resolve_host(config.host_name) if not ip_address: sys.exit("Unable to resolve IP address for host name") + ip = installutils.parse_ip_address(ip_address) + ip_address = str(ip) bind.add_master_dns_records(config.host_name, ip_address, config.realm_name, config.domain_name, -- cgit