richard: server/kolabd/kolabd ChangeLog, 1.183, 1.184 kolab_bootstrap.in, 1.39, 1.40
cvs at kolab.org
cvs at kolab.org
Wed Aug 20 22:15:42 CEST 2008
Author: richard
Update of /kolabrepository/server/kolabd/kolabd
In directory doto:/tmp/cvs-serv19157
Modified Files:
ChangeLog kolab_bootstrap.in
Log Message:
Added syncrepl support, see kolab/issue1755
Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/ChangeLog,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -d -r1.183 -r1.184
--- ChangeLog 14 Aug 2008 19:33:06 -0000 1.183
+++ ChangeLog 20 Aug 2008 20:15:40 -0000 1.184
@@ -1,3 +1,7 @@
+2008-08-20 Richard Bos <richard at radoeka.nl>
+
+ * kolab_bootstrap.in: added syncrepl support, see kolab/issue1755
+
2008-08-14 Richard Bos <richard at radoeka.nl>
* templates/slapd.conf.template.in: added syncrepl support,
Index: kolab_bootstrap.in
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/kolab_bootstrap.in,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- kolab_bootstrap.in 11 Aug 2008 19:22:55 -0000 1.39
+++ kolab_bootstrap.in 20 Aug 2008 20:15:40 -0000 1.40
@@ -17,6 +17,8 @@
use Socket;
use IO::File;
use IO::Select;
+use Kolab;
+use Kolab::Conf;
use Net::Domain qw(hostfqdn);
use Net::LDAP;
use Net::LDAP::Entry;
@@ -393,73 +395,24 @@
exit 1;
}
- # Creating slapd.conf from template
- my $tmpl = IO::File->new("@sysconfdir@/kolab/templates/slapd.conf.template", "r") || die "could not read @sysconfdir@/kolab/templates/slapd.conf.template";
- my $slpd = IO::File->new("@ldapserver_confdir@/slapd.conf","w+") || die "could not write to @ldapserver_confdir@/slapd.conf";
- chmod (0640,"@ldapserver_confdir@/slapd.conf");
- while (<$tmpl>) {
- if (/^KOLAB_META_START$/) {
- my $found_end;
- while (!$found_end) {
- $_ = <$tmpl>;
- $found_end = /^KOLAB_META_END$/;
- }
- $_ = <$tmpl>;
- }
- s/\@\@\@base_dn\@\@\@/$base_dn/g;
- s/\@\@\@bind_dn\@\@\@/$bind_dn/g;
- s/\@\@\@bind_pw_hash\@\@\@/$bind_pw/g;
- s/\@\@\@slurpd_addr\@\@\@/$slurpd_addr/g;
- s/\@\@\@slurpd_port\@\@\@/$slurpd_port/g;
- s/TLSCertificate/\#TLSCertificate/g;
- print $slpd $_;
- }
- undef $slpd;
- undef $tmpl;
- kolab_chown "@ldapserver_usr@","@ldapserver_grp@","@ldapserver_confdir@/slapd.conf";
-
- my $tmplname = "@sysconfdir@/kolab/templates/slapd.replicas.template";
- $confname = "@ldapserver_confdir@/slapd.replicas";
+ # Read the variables templatedir and log_level from kolab.globals.
+ # These variables are needed by the kolab configuration functions of
+ # Kolab::Conf need the variables.
+ %Kolab::config = Kolab::readConfig("@sysconfdir@/kolab/kolab.globals");
+ $Kolab::config{'directory_replication_mode_is_syncrepl'} = 'true' if ($Kolab::config{'directory_mode'} eq 'syncrepl');
+ $Kolab::config{"base_dn"} = $base_dn;
+ $Kolab::config{"bind_dn"} = $bind_dn;
+ $Kolab::config{"bind_pw_hash"} = $bind_pw;
+ $Kolab::config{"slurpd_addr"} = $slurpd_addr;
+ $Kolab::config{"slurpd_port"} = $slurpd_port;
- $tmpl = IO::File->new($tmplname, "r") || die "could not read $tmplname";
- $slpd = IO::File->new($confname,"w+") || die "could not write to $confname";
- chmod (0640,$confname);
- while (<$tmpl>) {
- if (/^KOLAB_META_START$/) {
- my $found_end;
- while (!$found_end) {
- $_ = <$tmpl>;
- $found_end = /^KOLAB_META_END$/;
- }
- $_ = <$tmpl>;
- }
- print $slpd $_;
- }
- undef $slpd;
- undef $tmpl;
- kolab_chown "@ldapserver_usr@","@ldapserver_grp@",$confname;
-
- $tmplname = "@sysconfdir@/kolab/templates/slapd.access.template";
- $confname = "@ldapserver_confdir@/slapd.access";
+ # During boot some settings like TLS certificates are not defined yet and
+ # hence can't be used, these definitons are skipped when
+ # bootstrap_config = true
+ $Kolab::config{"bootstrap_config"} = 'true';
+ Kolab::Conf::bootstrapConfig();
+ $Kolab::config{"bootstrap_config"} = 'false';
- $tmpl = IO::File->new($tmplname, "r") || die "could not read $tmplname";
- $slpd = IO::File->new($confname,"w+") || die "could not write to $confname";
- chmod (0640,$confname);
- while (<$tmpl>) {
- if (/^KOLAB_META_START$/) {
- my $found_end;
- while (!$found_end) {
- $_ = <$tmpl>;
- $found_end = /^KOLAB_META_END$/;
- }
- $_ = <$tmpl>;
- }
- print $slpd $_;
- }
- undef $slpd;
- undef $tmpl;
- kolab_chown "@ldapserver_usr@","@ldapserver_grp@",$confname;
-
# now we must startup slapd
print "temporarily starting slapd\n";
$ldap_uri = "ldap://127.0.0.1:389/";
More information about the commits
mailing list