import os
-import fcntl
-import sys
-import tempfile
-import subprocess
-
# ensure we get messages out immediately, so they get in the samba logs,
# and don't get swallowed by a timeout
os.environ['PYTHONUNBUFFERED'] = '1'
-
# forcing GMT avoids a problem in some timezones with kerberos. Both MIT
# heimdal can get mutual authentication errors due to the 24 second difference
# between UTC and GMT when using some zone files (eg. the PDT zone from
# the US)
os.environ["TZ"] = "GMT"
-
+import sys
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
+import time
+starttime = time.monotonic()
+
+import fcntl
+import tempfile
+import subprocess
+
+
import samba
import optparse
from samba import getopt as options
if opts.verbose:
print("IPs: %s" % IPs)
+if opts.verbose:
+ curtime = time.monotonic()
+ tdiff = curtime - starttime
+ print("Start delay: %s" % tdiff)
+
def get_possible_rw_dns_server(creds, domain):
"""Get a list of possible read-write DNS servers, starting with
the SOA. The SOA is the correct answer, but old Samba domains