summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-09-16 20:18:11 -0600
committerRob Crittenden <rcritten@redhat.com>2008-10-13 14:15:18 -0400
commit5cfd84756b04ed603bb72643857faa9988b441fc (patch)
treef3e01443f21135284e9ded9b3fb3c3fc114a9c42 /ipa-server/ipaserver
parent1555dadc186d862eb4c42885575ebeedcdf35084 (diff)
downloadfreeipa-5cfd84756b04ed603bb72643857faa9988b441fc.tar.gz
freeipa-5cfd84756b04ed603bb72643857faa9988b441fc.tar.xz
freeipa-5cfd84756b04ed603bb72643857faa9988b441fc.zip
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
Diffstat (limited to 'ipa-server/ipaserver')
-rw-r--r--ipa-server/ipaserver/installutils.py6
1 files changed, 5 insertions, 1 deletions
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: