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 | |
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')
-rw-r--r-- | ipa-server/ipa-install/ipa-server-install | 11 | ||||
-rw-r--r-- | ipa-server/ipa-install/share/indices.ldif | 8 | ||||
-rw-r--r-- | ipa-server/ipaserver/installutils.py | 6 |
3 files changed, 12 insertions, 13 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install index 2ac2638cf..c9d5c5bf3 100644 --- a/ipa-server/ipa-install/ipa-server-install +++ b/ipa-server/ipa-install/ipa-server-install @@ -86,6 +86,9 @@ def parse_options(): help="The password of the Directory Server PKCS#12 file") parser.add_option("--http_pin", dest="http_pin", help="The password of the Apache Server PKCS#12 file") + parser.add_option("--no-host-dns", dest="no_host_dns", action="store_true", + default=False, + help="Do not use DNS for hostname lookup during installation") options, args = parser.parse_args() @@ -119,7 +122,7 @@ def signal_handler(signum, frame): ipaserver.dsinstance.erase_ds_instance_data (ds.serverid) sys.exit(1) -def read_host_name(host_default): +def read_host_name(host_default,no_host_dns=False): host_name = "" print "Enter the fully qualified domain name of the computer" @@ -134,7 +137,7 @@ def read_host_name(host_default): host_name = user_input("Server host name", host_default, allow_empty = False) print "" try: - verify_fqdn(host_name) + verify_fqdn(host_name,no_host_dns) except Exception, e: raise e else: @@ -394,14 +397,14 @@ def main(): if options.unattended: try: - verify_fqdn(host_default) + verify_fqdn(host_default,options.no_host_dns) except RuntimeError, e: logging.error(str(e) + "\n") return 1 host_name = host_default else: - host_name = read_host_name(host_default) + host_name = read_host_name(host_default,options.no_host_dns) host_name = host_name.lower() diff --git a/ipa-server/ipa-install/share/indices.ldif b/ipa-server/ipa-install/share/indices.ldif index 3fb2f33d6..632a28791 100644 --- a/ipa-server/ipa-install/share/indices.ldif +++ b/ipa-server/ipa-install/share/indices.ldif @@ -64,14 +64,6 @@ changetype: modify add: nsIndexType nsIndexType:sub -dn: cn=memberof,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config -changetype: add -objectClass:top -objectClass:nsIndex -cn:memberof -nsSystemIndex:false -nsIndexType:eq - dn: cn=uidnumber,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config changetype: add objectClass:top 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: |