mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
e26b3e14eb
commit
8aa01e24a1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user