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:
parent
60449d561d
commit
292003343e
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user