From 5cfd84756b04ed603bb72643857faa9988b441fc Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 16 Sep 2008 20:18:11 -0600 Subject: add --no-host-dns option to ipa-server-install - allows specifying a hostname that might actually exist but you do not want to even attempt to resolve it via DNS --- ipa-server/ipaserver/installutils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ipa-server/ipaserver') diff --git a/ipa-server/ipaserver/installutils.py b/ipa-server/ipaserver/installutils.py index 90e1c6ab6..563b168e8 100644 --- a/ipa-server/ipaserver/installutils.py +++ b/ipa-server/ipaserver/installutils.py @@ -43,7 +43,7 @@ def get_fqdn(): fqdn = "" return fqdn -def verify_fqdn(host_name): +def verify_fqdn(host_name,no_host_dns=False): if len(host_name.split(".")) < 2 or host_name == "localhost.localdomain": raise RuntimeError("Invalid hostname: " + host_name) @@ -66,6 +66,10 @@ def verify_fqdn(host_name): if revname != host_name: raise RuntimeError("The host name %s does not match the reverse lookup %s" % (host_name, revname)) + if no_host_dns: + print "Warning: skipping DNS resolution of host", host_name + return + # Verify this is NOT a CNAME rs = dnsclient.query(host_name+".", dnsclient.DNS_C_IN, dnsclient.DNS_T_CNAME) if len(rs) != 0: -- cgit