From 45d9d4e8ae524cdc91effc05ce3fe1c06cfb750e Mon Sep 17 00:00:00 2001 From: Petr Spacek Date: Tue, 10 Nov 2015 11:22:43 +0100 Subject: ipa-dns-install offer IP addresses from resolv.conf as default forwarders In non-interactive more option --auto-forwarders can be used to do the same. --forward option can be used to supply additional IP addresses. https://fedorahosted.org/freeipa/ticket/5438 Reviewed-By: Jan Cholasta --- ipaserver/install/installutils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ipaserver/install/installutils.py') diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 489d03bda..156c8a5eb 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -282,6 +282,13 @@ def read_ip_addresses(): def read_dns_forwarders(): addrs = [] if ipautil.user_input("Do you want to configure DNS forwarders?", True): + print("Following DNS servers are configured in /etc/resolv.conf: %s" % + ", ".join(resolver.get_default_resolver().nameservers)) + if ipautil.user_input("Do you want to configure these servers as DNS " + "forwarders?", True): + addrs = resolver.default_resolver.nameservers[:] + print("All DNS servers from /etc/resolv.conf were added. You can " + "enter additional addresses now:") while True: ip = ipautil.user_input("Enter an IP address for a DNS forwarder, " "or press Enter to skip", allow_empty=True) -- cgit