diff options
author | Rich Megginson <rmeggins@redhat.com> | 2008-09-16 20:18:11 -0600 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-10-13 14:09:07 -0400 |
commit | be5e783f72c987603288522a21e7f9bab1e9bd9a (patch) | |
tree | f3e01443f21135284e9ded9b3fb3c3fc114a9c42 /ipa-server/ipaserver | |
parent | 5a5bfa2c70a15a0be20d92fae72faefcc619d18b (diff) | |
download | freeipa-be5e783f72c987603288522a21e7f9bab1e9bd9a.tar.gz freeipa-be5e783f72c987603288522a21e7f9bab1e9bd9a.tar.xz freeipa-be5e783f72c987603288522a21e7f9bab1e9bd9a.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.py | 6 |
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: |