steffen: server/kolab/kolab kolab_bootstrap,1.29,1.30
cvs at intevation.de
cvs at intevation.de
Mon May 31 01:40:24 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab/kolab
In directory doto:/tmp/cvs-serv29792
Modified Files:
kolab_bootstrap
Log Message:
disable openldap for slave servers
Index: kolab_bootstrap
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_bootstrap,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- kolab_bootstrap 26 May 2004 02:11:23 -0000 1.29
+++ kolab_bootstrap 30 May 2004 23:40:22 -0000 1.30
@@ -200,9 +200,9 @@
print "prepare LDAP database...\n";
if ($ldap_uri =~ /127\.0\.0\.1/ || $ldap_uri =~ /localhost/) {
print "stop running slapd (if any)\n";
- system("$kolab_prefix/etc/rc openldap stop");
+ system("$kolab_prefix/bin/openpkg rc openldap stop");
sleep 1;
- system("$kolab_prefix/etc/rc openldap stop");
+ system("$kolab_prefix/bin/openpkg rc openldap stop");
sleep 1;
# Make sure that no rouge demons are running
@@ -413,6 +413,19 @@
}
} else {
##### Slave server setup
+
+ print "stop running slapd (if any)\n";
+ system("$kolab_prefix/bin/openpkg rc openldap stop");
+ sleep 1;
+ system("$kolab_prefix/bin/openpkg rc openldap stop");
+ sleep 1;
+
+ # Make sure that no rouge demons are running
+ tryConnect( '127.0.0.1', 389 ) && die "A process is already listening to port 389 (ldap)\n"
+ ."Please stop any running ldap server and bootstrap again\n";
+ tryConnect( '127.0.0.1', 9999 ) && die "A process is already listening to port 9999 (kolabd)\n"
+ ."Please stop any running kolabd and bootstrap again\n";
+
# For now we just connect to the remote slapd
SLAVESTART:
print "Now some information about the master LDAP server is required:\n\n";
@@ -465,8 +478,8 @@
$cfg .= $_ while (<FH>);
close(FH);
- $cfg =~ s/\n((openldap_url|sasl_authmech)\S*=[^\n]*)/#$1\n/sg;
- $cfg .= "openldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
+ $cfg =~ s/\n((openldap_url|sasl_authmech|openldap_enable)\S*=[^\n]*)/#$1\n/sg;
+ $cfg .= "openldap_enable=\"no\"\nopenldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
open(FH, ">$kolab_prefix/etc/rc.conf") || die;
print FH $cfg;
More information about the commits
mailing list