dnsupdate: Pass smb.conf through to samba-tool commands
[kai/samba-autobuild/.git] / source4 / scripting / bin / samba_dnsupdate
index ae355e9ec4e904b394baea7ff3ab5eb58dcc2301..18b61977dff1c82b14b3a68a045988ada349b22c 100755 (executable)
@@ -122,6 +122,7 @@ for i in IPs:
     else:
         IP4s.append(i)
 
+smb_conf = sambaopts.get_loadparm_path()
 
 if opts.verbose:
     print("IPs: %s" % IPs)
@@ -620,6 +621,9 @@ def call_samba_tool(d, op="add", zone=None):
     if d.type == "NS":
         args = [rpc_server_ip, zone, short_name, "NS", d.dest]
 
+    if smb_conf and args:
+        args += ["--configfile=" + smb_conf]
+
     global error_count
     try:
         cmd = cmd_dns()