martin: server/kolab/kolab kolab_bootstrap, 1.19, 1.20 slapd.conf.template, 1.16, 1.17

cvs at intevation.de cvs at intevation.de
Mon Apr 26 00:15:28 CEST 2004


Author: martin

Update of /kolabrepository/server/kolab/kolab
In directory doto:/tmp/cvs-serv2945

Modified Files:
	kolab_bootstrap slapd.conf.template 
Log Message:
Martin K.: issue tracker #88 https://intevation.de/roundup/kolab/issue88
chmod on slapd.conf in kolab_bootstrap. Added comment in template



Index: kolab_bootstrap
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_bootstrap,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- kolab_bootstrap	22 Apr 2004 11:45:17 -0000	1.19
+++ kolab_bootstrap	25 Apr 2004 22:15:25 -0000	1.20
@@ -1,7 +1,7 @@
 #!@l_prefix@/bin/perl
 
 # (c) 2003 Tassilo Erlewein <tassilo.erlewein at erfrakon.de>
-# (c) 2003 Martin Konold <martin.konold at erfrakon.de>
+# (c) 2004 Martin Konold <martin.konold at erfrakon.de>
 # (c) 2003 Achim Frank <achim.frank at erfrakon.de>
 # This program is Free Software under the GNU General Public License (>=v2).
 # Read the file COPYING that comes with this packages for details.
@@ -128,19 +128,14 @@
 if ($opt_b) {
    print "prepare LDAP database...\n";
    if ($ldap_uri =~ /127\.0\.0\.1/ || $ldap_uri =~ /localhost/) {
-      print "kill running slapd (if any)\n";
+      print "stop running slapd (if any)\n";
       system("$kolab_prefix/etc/rc openldap stop");
       sleep 1;
       system("$kolab_prefix/etc/rc openldap stop");
       sleep 1;
-      #system("killall -9 slapd >/dev/null 2>&1");
-      sleep 1;
-      #system("killall -9 slapd >/dev/null 2>&1");
-      sleep 1;
-      my $tmpl = IO::File->new("$kolab_prefix/etc/kolab/slapd.conf.template", "r")
-        || die "could not read $kolab_prefix/etc/kolab/slapd.conf.template";
-      my $slpd = IO::File->new("$kolab_prefix/etc/openldap/slapd.conf","w+")
-        || die "could not write to $kolab_prefix/etc/openldap/slapd.conf";
+      my $tmpl = IO::File->new("$kolab_prefix/etc/kolab/slapd.conf.template", "r") || die "could not read $kolab_prefix/etc/kolab/slapd.conf.template";
+      my $slpd = IO::File->new("$kolab_prefix/etc/openldap/slapd.conf","w+") || die "could not write to $kolab_prefix/etc/openldap/slapd.conf";
+      chmod (0640,"$kolab_prefix/etc/openldap/slapd.conf");
       foreach (<$tmpl>) {
          s/\@\@\@base_dn\@\@\@/$base_dn/g;
          s/\@\@\@bind_dn\@\@\@/$bind_dn/g;
@@ -151,7 +146,7 @@
       undef $slpd;
       undef $tmpl;
       # now we must startup slapd
-      print "temporarily start slapd\n";
+      print "temporarily starting slapd\n";
       $ldap_uri = "ldap://127.0.0.1:389/";
       system("$kolab_prefix/libexec/openldap/slapd -h ldap://127.0.0.1:389/ -f $kolab_prefix/etc/openldap/slapd.conf");
       sleep 3;
@@ -175,6 +170,7 @@
       } else {
          print "modifying existing kolab config object\n";
       }
+
 
       # create kolab config object
       my $ldapobject = Net::LDAP::Entry->new;

Index: slapd.conf.template
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/slapd.conf.template,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- slapd.conf.template	23 Apr 2004 13:31:03 -0000	1.16
+++ slapd.conf.template	25 Apr 2004 22:15:25 -0000	1.17
@@ -1,11 +1,13 @@
 # (c) 2003 Tassilo Erlewein <tassilo.erlewein at erfrakon.de>
-# (c) 2003 Martin Konold <martin.konold at erfrakon.de>
+# (c) 2004 Martin Konold <martin.konold at erfrakon.de>
 # (c) 2003 Achim Frank <achim.frank at erfrakon.de>
 # This program is Free Software under the GNU General Public License (>=v2).
 # Read the file COPYING that comes with this packages for details.
 
 
-# this file is automatically written by the Kolab config backend
+# this file is automatically written by the Kolab config backend and should have the 
+# file mode 0640
+
 # manual additions are lost unless made to the template in the Kolab config directory
 # the template is  @l_prefix@/etc/kolab/slapd.conf.template
 





More information about the commits mailing list