summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/installutils.py
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2010-02-08 19:31:57 +0100
committerRob Crittenden <rcritten@redhat.com>2010-02-16 13:44:38 -0500
commitf52c671ca10c65f8b55327e12ca6a9c61c01ef37 (patch)
treea2c3ae6b7f1de4358c842d992d92b7f8ffd2b5a1 /ipaserver/install/installutils.py
parenta292e9901b491307738637de614a6a69a153bd40 (diff)
downloadfreeipa-f52c671ca10c65f8b55327e12ca6a9c61c01ef37.tar.gz
freeipa-f52c671ca10c65f8b55327e12ca6a9c61c01ef37.tar.xz
freeipa-f52c671ca10c65f8b55327e12ca6a9c61c01ef37.zip
Make the DNS forwarders interactive input less confusing
Fixes #558984
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r--ipaserver/install/installutils.py30
1 files changed, 17 insertions, 13 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index 6365fe82e..df3c8916c 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -151,19 +151,23 @@ def read_ip_address(host_name, fstore):
def read_dns_forwarders():
addrs = []
- while True:
- ip = ipautil.user_input("Enter IP address for a DNS forwarder (empty to stop)", allow_empty=True)
-
- if not ip:
- break
- if ip == "127.0.0.1" or ip == "::1":
- print "You cannot use localhost as a DNS forwarder"
- continue
- if not verify_ip_address(ip):
- continue
-
- print "DNS forwarder %s added" % ip
- addrs.append(ip)
+ if ipautil.user_input("Do you wish to configure DNS forwarders?", False):
+ print "Please enter the IP addresses of DNS forwarders that you want to use."
+ print "After you are done, enter a blank line to stop."
+
+ while True:
+ ip = ipautil.user_input("Enter IP address for a DNS forwarder",
+ allow_empty=True)
+ if not ip:
+ break
+ if ip == "127.0.0.1" or ip == "::1":
+ print "You cannot use localhost as a DNS forwarder"
+ continue
+ if not verify_ip_address(ip):
+ continue
+
+ print "DNS forwarder %s added" % ip
+ addrs.append(ip)
if not addrs:
print "No DNS forwarders configured"