1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

s4-provision: add log messages about IP lookup

the IPv6 lookup can be very slow if a DNS server in the search list is
unavailable. It's good to let the user know what its doing.
This commit is contained in:
Andrew Tridgell 2010-11-17 12:54:13 +11:00
parent 60449d561d
commit 292003343e

View File

@ -1477,6 +1477,7 @@ def provision(setup_dir, logger, session_info,
paths.bind_gid = bind_gid
if hostip is None:
logger.info("Looking up IPv4 addresses")
hostips = samba.interface_ips(lp, False)
if len(hostips) == 0:
logger.warning("No external IPv4 address has been found. Using loopback.")
@ -1488,6 +1489,7 @@ def provision(setup_dir, logger, session_info,
if hostip6 is None:
try:
logger.info("Looking up IPv6 address for %s" % names.hostname)
for ip in socket.getaddrinfo(names.hostname, None, socket.AF_INET6, socket.AI_CANONNAME, socket.IPPROTO_IP):
if hostip6 is None:
hostip6 = ip[-1][0]