Clean up of IP address checks in install scripts.

Fixes ipa-dns-install incorrect warning.

ticket 1486
This commit is contained in:
Jan Cholasta
2011-07-18 13:36:47 +02:00
committed by Martin Kosek
parent 9869b0971d
commit c09f116f43
4 changed files with 13 additions and 38 deletions

View File

@@ -186,7 +186,7 @@ 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 = ipautil.CheckedIPAddress(ip_address, match_local=True)
ip_address = str(ip)
if options.reverse_zone:
@@ -225,7 +225,7 @@ 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 = ipautil.CheckedIPAddress(ip_address, match_local=True)
ip_address = str(ip)
reverse_zone = bindinstance.find_reverse_zone(ip)