summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-05-27 20:17:22 +0200
committerMartin Kosek <mkosek@redhat.com>2011-05-30 13:36:26 +0200
commit80b4b3d44bbbe745e644b56c5371ef5f4cda6600 (patch)
tree970dd0df7105626fa997330afe0b30026dfcc5bf /install/tools/ipa-replica-install
parent868d4e734ed0f22221f25a1067fbf57141b64c21 (diff)
downloadfreeipa-80b4b3d44bbbe745e644b56c5371ef5f4cda6600.tar.gz
freeipa-80b4b3d44bbbe745e644b56c5371ef5f4cda6600.tar.xz
freeipa-80b4b3d44bbbe745e644b56c5371ef5f4cda6600.zip
Parse netmasks in IP addresses passed to server install.
ticket 1212
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install6
1 files changed, 5 insertions, 1 deletions
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,