Merge branch 'master' of ssh://git.samba.org/data/git/samba
authorJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 11:49:37 +0000 (12:49 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 25 Feb 2009 11:49:37 +0000 (12:49 +0100)
Conflicts:
source4/scripting/python/samba/provision.py

1  2 
source4/scripting/python/samba/provision.py

@@@ -1341,11 -1364,53 +1364,53 @@@ def provision_backend(setup_dir=None, m
  
                          rid=rid+1
                          mmr_syncrepl_user_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
-                                                                      {         "RID" : str(rid),
-                                                                             "MMRDN": names.domaindn,
-                                                                                "LDAPSERVER" : url,
+                                                                      {  "RID" : str(rid),
+                                                                         "MMRDN": names.domaindn,
+                                                                         "LDAPSERVER" : url,
                                                                          "MMR_PASSWORD": mmr_pass })
 -      # olc = yes?
++        # olc = yes?
+         olc_config_pass = ""
+         olc_config_acl = ""
+         olc_syncrepl_config = ""
+         olc_mmr_config = "" 
+         if ol_olc == "yes":
+                 olc_config_pass += read_and_sub_file(setup_path("olc_pass.conf"),
+                                                                 { "OLC_PW": adminpass })
+                 olc_config_acl += read_and_sub_file(setup_path("olc_acl.conf"),{})
+                 
+             # if olc = yes + mmr = yes, generate cn=config-replication directives
+             # and  olc_seed.lif for the other mmr-servers
+                 if ol_olc == "yes" and ol_mmr_urls is not None:
+                         serverid=0
+                         olc_serverids_config = ""
+                         olc_syncrepl_config = ""
+                         olc_syncrepl_seed_config = ""
+                         olc_mmr_config = "" 
+                         olc_mmr_config += read_and_sub_file(setup_path("olc_mmr.conf"),{})
+                         rid=1000
+                         for url in url_list:
+                                 serverid=serverid+1
+                                 olc_serverids_config += read_and_sub_file(setup_path("olc_serverid.conf"),
+                                                                      { "SERVERID" : str(serverid),
+                                                                        "LDAPSERVER" : url })
+                         
+                                 rid=rid+1
+                                 olc_syncrepl_config += read_and_sub_file(setup_path("olc_syncrepl.conf"),
+                                                                      {  "RID" : str(rid),
+                                                                         "LDAPSERVER" : url,
+                                                                         "MMR_PASSWORD": adminpass})
+                                 olc_syncrepl_seed_config += read_and_sub_file(setup_path("olc_syncrepl_seed.conf"),
+                                                                      {  "RID" : str(rid),
+                                                                         "LDAPSERVER" : url})
+                                 setup_file(setup_path("olc_seed.ldif"), paths.olcseedldif,
+                                                                      {"OLC_SERVER_ID_CONF": olc_serverids_config,
+                                                                       "OLC_PW": adminpass,
+                                                                       "OLC_SYNCREPL_CONF": olc_syncrepl_seed_config})
+         
  
+                 # end olc
  
          setup_file(setup_path("slapd.conf"), paths.slapdconf,
                     {"DNSDOMAIN": names.dnsdomain,