diff options
author | Petr Spacek <pspacek@redhat.com> | 2015-11-10 11:22:43 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-12-01 10:19:25 +0100 |
commit | 45d9d4e8ae524cdc91effc05ce3fe1c06cfb750e (patch) | |
tree | e8139e3c8e2d8a73774760524e4831d3c5e1d4cb /ipaserver/install/installutils.py | |
parent | fa62480c73ccb860c8c8b4cd110b0782eb4883d5 (diff) | |
download | freeipa-45d9d4e8ae524cdc91effc05ce3fe1c06cfb750e.tar.gz freeipa-45d9d4e8ae524cdc91effc05ce3fe1c06cfb750e.tar.xz freeipa-45d9d4e8ae524cdc91effc05ce3fe1c06cfb750e.zip |
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 <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r-- | ipaserver/install/installutils.py | 7 |
1 files changed, 7 insertions, 0 deletions
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) |