The branch, master has been updated
       via  af08cb2 source4/scripting: add an option to samba_dnsupdate to add 
ns records.
      from  7d9a876 ctdb-tests: Update local daemons tests to use 
CTDB_NOSETSCHED

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit af08cb2eee9dc9fabad6ca62ca11728209297222
Author: Richard Sharpe <rsha...@samba.org>
Date:   Mon May 23 17:37:13 2016 -0700

    source4/scripting: add an option to samba_dnsupdate to add ns records.
    
    Add a --add-ns option to samba_dnsupdate and use that, but only when 
--use-file has been specified, to add an NS record to the file produced.
    
    This allows us to make progress in the self tests and is an interim fix.
    
    Signed-off-by: Richard Sharpe <rsha...@samba.org>
    Reviewed-by: Rowland Penny <repenny241...@gmail.com>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Tue Jun 21 00:51:02 CEST 2016 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source4/scripting/bin/samba_dnsupdate | 10 ++++++++++
 1 file changed, 10 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/samba_dnsupdate 
b/source4/scripting/bin/samba_dnsupdate
index 16265f6..3880dda 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -69,6 +69,7 @@ parser.add_option("--all-interfaces", action="store_true")
 parser.add_option("--current-ip", action="append", help="IP address to update 
DNS to match (helpful if behind NAT, valid multiple times, defaults to values 
from interfaces=)")
 parser.add_option("--rpc-server-ip", type="string", help="IP address of server 
to use with samba-tool (defaults to first --current-ip)")
 parser.add_option("--use-file", type="string", help="Use a file, rather than 
real DNS calls")
+parser.add_option("--add-ns", action="store_true", help="Add an NS record to 
the DNS file for self-tests. Can only be used with --use-file")
 parser.add_option("--update-list", type="string", help="Add DNS names from the 
given file")
 parser.add_option("--update-cache", type="string", help="Cache database of 
already registered records")
 parser.add_option("--fail-immediately", action='store_true', help="Exit on 
first failure")
@@ -681,6 +682,15 @@ dup_set = set()
 cache_set = set()
 
 rebuild_cache = False
+
+# Add an NS line if asked to ...
+if opts.add_ns:
+    if opts.use_file is None:
+        print "Option --add-ns can only be used with --use-file"
+        sys.exit(1)
+    else:
+        dns_list.append(parse_dns_line("NS ${DNSDOMAIN} ${HOSTNAME}", 
sub_vars))
+
 try:
     cfile = open(dns_update_cache, 'r+')
 except IOError:


-- 
Samba Shared Repository

Reply via email to