richard: server/kolabconf/lib/Kolab Conf.pm,1.13,1.14
cvs at kolab.org
cvs at kolab.org
Sat Aug 9 11:42:40 CEST 2008
Author: richard
Update of /kolabrepository/server/kolabconf/lib/Kolab
In directory doto:/tmp/cvs-serv24145/lib/Kolab
Modified Files:
Conf.pm
Log Message:
added syncrepl support (see kolab/issue1755)
Index: Conf.pm
===================================================================
RCS file: /kolabrepository/server/kolabconf/lib/Kolab/Conf.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Conf.pm 25 Feb 2008 15:05:04 -0000 1.13
+++ Conf.pm 9 Aug 2008 09:42:38 -0000 1.14
@@ -524,25 +524,44 @@
exit(1);
}
- if( $Kolab::config{'is_master'} eq "true" ) {
- # Master setup
- my @kh;
- if( ref $Kolab::config{'kolabhost'} eq 'ARRAY' ) {
- @kh = @{$Kolab::config{'kolabhost'}};
- } else {
- @kh = ( $Kolab::config{'kolabhost'} );
- }
- for my $h ( @kh ) {
- next if lc($h) eq lc($Kolab::config{'fqdnhostname'});
- print $repl "replica uri=ldaps://$h\n"
- ." binddn=\"".$Kolab::config{'bind_dn'}."\"\n"
- ." bindmethod=simple credentials=".$Kolab::config{'bind_pw'}."\n\n";
- }
+ # directory_mode syncrepl is supported from openldap-2.3.x and beyond
+ if ($Kolab::config{'directory_mode'} eq "syncrepl") {
+
+ if ( $Kolab::config{'is_master'} eq "false" ) {
+ # Output a syncrepl statement for database synchronisation
+ print $repl "syncrepl rid=0 \n"
+ ." provider=".$Kolab::config{"ldap_master_uri"}."\n"
+ ." type=refreshAndPersist\n"
+ ." searchbase=\"".$Kolab::config{'base_dn'}."\"\n"
+ ." scope=sub\n"
+ ." schemachecking=on\n"
+ ." binddn=\"".$Kolab::config{"bind_dn"}."\"\n"
+ ." credentials=\"".$Kolab::config{"bind_pw"}."\"\n"
+ ." bindmethod=simple\n";
+ }
+
} else {
- # Slave setup
- # Output an update dn statement instead
- print $repl "updatedn ".$Kolab::config{'bind_dn'}."\n";
- print $repl "updateref ".$Kolab::config{'ldap_master_uri'}."\n";
+
+ if( $Kolab::config{'is_master'} eq "true" ) {
+ # Master setup
+ my @kh;
+ if( ref $Kolab::config{'kolabhost'} eq 'ARRAY' ) {
+ @kh = @{$Kolab::config{'kolabhost'}};
+ } else {
+ @kh = ( $Kolab::config{'kolabhost'} );
+ }
+ for my $h ( @kh ) {
+ next if lc($h) eq lc($Kolab::config{'fqdnhostname'});
+ print $repl "replica uri=ldaps://$h\n"
+ ." binddn=\"".$Kolab::config{'bind_dn'}."\"\n"
+ ." bindmethod=simple credentials=".$Kolab::config{'bind_pw'}."\n\n";
+ }
+ } else {
+ # Slave setup
+ # Output an update dn statement instead
+ print $repl "updatedn ".$Kolab::config{'bind_dn'}."\n";
+ print $repl "updateref ".$Kolab::config{'ldap_master_uri'}."\n";
+ }
}
$repl->close;
More information about the commits
mailing list