summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-09-29 10:15:05 -0700
committerMatthieu Patou <mat@matws.net>2012-10-07 22:11:47 -0700
commit95ea6d765b98d9cbdebaa8e23aad91525d94ad40 (patch)
treeeade52d86c095af51390d19617d049a59b76e32d /source4/scripting
parentd57e0d8a6d213543a772a517551cca053cece85e (diff)
downloadsamba-95ea6d765b98d9cbdebaa8e23aad91525d94ad40.tar.gz
samba-95ea6d765b98d9cbdebaa8e23aad91525d94ad40.tar.bz2
samba-95ea6d765b98d9cbdebaa8e23aad91525d94ad40.zip
s4-join: factorize code, add info
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/join.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 6d268b2820..7b511f82c1 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -115,6 +115,7 @@ class dc_join(object):
ctx.dnsdomain = ctx.samdb.domain_dns_name()
ctx.dnsforest = ctx.samdb.forest_dns_name()
ctx.domaindns_zone = 'DC=DomainDnsZones,%s' % ctx.base_dn
+ ctx.forestdns_zone = 'DC=ForestDnsZones,%s' % ctx.base_dn
res_domaindns = ctx.samdb.search(scope=ldb.SCOPE_ONELEVEL,
attrs=[],
@@ -745,11 +746,14 @@ class dc_join(object):
repl.replicate(ctx.base_dn, source_dsa_invocation_id,
destination_dsa_guid, rodc=ctx.RODC,
replica_flags=ctx.domain_replica_flags)
+ print "Done with always replicated NC (base, config, schema)"
- if ctx.domaindns_zone in ctx.nc_list:
- repl.replicate(ctx.domaindns_zone, source_dsa_invocation_id,
- destination_dsa_guid, rodc=ctx.RODC,
- replica_flags=ctx.replica_flags)
+ for nc in (ctx.domaindns_zone, ctx.forestdns_zone):
+ if nc in ctx.nc_list:
+ print "Replicating %s" % (str(nc))
+ repl.replicate(nc, source_dsa_invocation_id,
+ destination_dsa_guid, rodc=ctx.RODC,
+ replica_flags=ctx.replica_flags)
if 'DC=ForestDnsZones,%s' % ctx.root_dn in ctx.nc_list:
repl.replicate('DC=ForestDnsZones,%s' % ctx.root_dn, source_dsa_invocation_id,
@@ -803,7 +807,7 @@ class dc_join(object):
# DC we just replicated from then we don't need to send the updatereplicateref
# as replication between sites is time based and on the initiative of the
# requesting DC
- print "Sending DsReplicateUpdateRefs for all the partitions"
+ print "Sending DsReplicateUpdateRefs for all the replicated partitions"
for nc in ctx.full_nc_list:
ctx.send_DsReplicaUpdateRefs(nc)