s4-dns: added --all-names option to samba_dnsupdate
authorAndrew Tridgell <tridge@samba.org>
Sun, 19 Sep 2010 20:02:05 +0000 (13:02 -0700)
committerAndrew Tridgell <tridge@samba.org>
Sun, 19 Sep 2010 20:36:02 +0000 (13:36 -0700)
this forces the re-registration of all names

source4/scripting/bin/samba_dnsupdate

index 4dafe793758d3478802d5f19a59100190a2d76db..6729328d96de9b5a1a22ff04c96185524ddc650c 100755 (executable)
@@ -49,6 +49,7 @@ sambaopts = options.SambaOptions(parser)
 parser.add_option_group(sambaopts)
 parser.add_option_group(options.VersionOptions(parser))
 parser.add_option("--verbose", action="store_true")
+parser.add_option("--all-names", action="store_true")
 parser.add_option("--all-interfaces", action="store_true")
 parser.add_option("--use-file", type="string", help="Use a file, rather than real DNS calls")
 
@@ -337,7 +338,7 @@ for d in dns_list:
 
 # now check if the entries already exist on the DNS server
 for d in dns_list:
-    if not check_dns_name(d):
+    if opts.all_names or not check_dns_name(d):
         update_list.append(d)
 
 if len(update_list) == 0: