summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kupka <dkupka@redhat.com>2014-09-02 16:32:30 +0200
committerPetr Viktorin <pviktori@dhcp-31-13.brq.redhat.com>2014-09-03 16:03:31 +0200
commit8aa01e24a1664f5f523732f79ae8d842fb4417a8 (patch)
tree3bef477fec4f379dc76a608cbbd0145680f8f71c
parente26b3e14eb07baa4868109307d9d064bab4c5e0b (diff)
downloadfreeipa-8aa01e24a1664f5f523732f79ae8d842fb4417a8.tar.gz
freeipa-8aa01e24a1664f5f523732f79ae8d842fb4417a8.tar.xz
freeipa-8aa01e24a1664f5f523732f79ae8d842fb4417a8.zip
Add record(s) to /etc/host when IPA is configured as DNS server.
This is to avoid chicken-egg problem when directory server fails to start without resolvable hostname and named fails to provide hostname without directory server. https://fedorahosted.org/freeipa/ticket/4220 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
-rw-r--r--ipaserver/install/installutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index dc98d7a51..3b9138fef 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -489,7 +489,7 @@ def get_server_ip_address(host_name, fstore, unattended, options):
hosts_record = record_in_hosts(ip_address)
if hosts_record is None:
- if ip_add_to_hosts:
+ if ip_add_to_hosts or options.setup_dns:
print "Adding ["+ip_address+" "+host_name+"] to your /etc/hosts file"
fstore.backup_file(paths.HOSTS)
add_record_to_hosts(ip_address, host_name)