mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
parent
a292e9901b
commit
f52c671ca1
@ -151,19 +151,23 @@ def read_ip_address(host_name, fstore):
|
|||||||
|
|
||||||
def read_dns_forwarders():
|
def read_dns_forwarders():
|
||||||
addrs = []
|
addrs = []
|
||||||
while True:
|
if ipautil.user_input("Do you wish to configure DNS forwarders?", False):
|
||||||
ip = ipautil.user_input("Enter IP address for a DNS forwarder (empty to stop)", allow_empty=True)
|
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."
|
||||||
|
|
||||||
if not ip:
|
while True:
|
||||||
break
|
ip = ipautil.user_input("Enter IP address for a DNS forwarder",
|
||||||
if ip == "127.0.0.1" or ip == "::1":
|
allow_empty=True)
|
||||||
print "You cannot use localhost as a DNS forwarder"
|
if not ip:
|
||||||
continue
|
break
|
||||||
if not verify_ip_address(ip):
|
if ip == "127.0.0.1" or ip == "::1":
|
||||||
continue
|
print "You cannot use localhost as a DNS forwarder"
|
||||||
|
continue
|
||||||
|
if not verify_ip_address(ip):
|
||||||
|
continue
|
||||||
|
|
||||||
print "DNS forwarder %s added" % ip
|
print "DNS forwarder %s added" % ip
|
||||||
addrs.append(ip)
|
addrs.append(ip)
|
||||||
|
|
||||||
if not addrs:
|
if not addrs:
|
||||||
print "No DNS forwarders configured"
|
print "No DNS forwarders configured"
|
||||||
|
Loading…
Reference in New Issue
Block a user