From d0e74ba26c0579519f94827cf464d4b458ee03c5 Mon Sep 17 00:00:00 2001
From: Oliver Liebel <oliver@itc.li>
Date: Tue, 16 Mar 2010 19:50:24 +0100
Subject: [PATCH] Fixed MMR-URL-Split and changed RID-Range OpenLDAP ITS6394

---
 source4/scripting/python/samba/provisionbackend.py |   22 ++++++++++----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index 1919c5d..1d0c5b8 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -350,21 +350,21 @@ class OpenLDAPBackend(LDAPBackend):
         mmr_syncrepl_schema_config = "" 
         mmr_syncrepl_config_config = "" 
         mmr_syncrepl_user_config = "" 
-       
-    
+
+
         if self.ol_mmr_urls is not None:
             # For now, make these equal
             mmr_pass = self.ldapadminpass
-        
+
             url_list=filter(None,self.ol_mmr_urls.split(' ')) 
             if (len(url_list) == 1):
-                url_list=filter(None,self.ol_mmr_urls.split(',')) 
-                     
-            
-                mmr_on_config = "MirrorMode On"
-                mmr_replicator_acl = "  by dn=cn=replicator,cn=samba read"
-                serverid=0
-                for url in url_list:
+                raise ProvisioningError("At least 2 LDAP-URLs needed for MMR!")
+                # raise error if only 1 ol-mmr-url was commited during provision
+
+            mmr_on_config = "MirrorMode On"
+            mmr_replicator_acl = "  by dn=cn=replicator,cn=samba read"
+            serverid=0
+            for url in url_list:
                     serverid=serverid+1
                     mmr_serverids_config += read_and_sub_file(self.setup_path("mmr_serverids.conf"),
                                                           { "SERVERID" : str(serverid),
@@ -400,7 +400,7 @@ class OpenLDAPBackend(LDAPBackend):
             olc_serverids_config = ""
             olc_syncrepl_seed_config = ""
             olc_mmr_config += read_and_sub_file(self.setup_path("olc_mmr.conf"),{})
-            rid=1000
+            rid=500
             for url in url_list:
                 serverid=serverid+1
                 olc_serverids_config += read_and_sub_file(self.setup_path("olc_serverid.conf"),
-- 
1.6.0.2

