s4-provision: also create the dns_update_list when running net vampire
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Feb 2010 06:22:44 +0000 (17:22 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 26 Feb 2010 07:19:27 +0000 (18:19 +1100)
We need the list when joining a windows domain, so we can
automatically maintain the right DNS entries on the Windows DNS server

source4/scripting/python/samba/provision.py

index 6adc79f2b175e40dd765c01b8f296b056b2d63cc..2dd664303da0537984705a2ac3e3e85d18bbef3e 100644 (file)
@@ -1404,6 +1404,9 @@ def provision(setup_dir, message, session_info,
                              realm=names.realm)
             message("A Kerberos configuration suitable for Samba 4 has been generated at %s" % paths.krb5conf)
 
+    if serverrole == "domain controller":
+        create_dns_update_list(lp, message, paths, setup_path)
+
     provision_backend.post_setup()
     provision_backend.shutdown()
     
@@ -1573,6 +1576,13 @@ def create_zone_file(lp, message, paths, targetdir, setup_path, dnsdomain,
         os.system(rndc + " unfreeze " + lp.get("realm"))
 
 
+def create_dns_update_list(lp, message, paths, setup_path):
+    """Write out a dns_update_list file"""
+    # note that we use no variable substitution on this file
+    # the substitution is done at runtime by samba_dnsupdate
+    setup_file(setup_path("dns_update_list"), paths.dns_update_list, None)
+
+
 def create_named_conf(paths, setup_path, realm, dnsdomain,
                       private_dir):
     """Write out a file containing zone statements suitable for inclusion in a