Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > e07dedf8757a13d631cf617e2d5d4a1a > files > 3

kolab-1.9.5-0.20050801.4mdk.src.rpm

--- 1/kolab_bootstrap.orig	2005-07-08 17:42:51.000000000 -0300
+++ 1/kolab_bootstrap	2005-07-08 17:45:38.000000000 -0300
@@ -537,14 +537,16 @@
    print "Create initial config files for postfix, apache, proftpd, cyrus imap, saslauthd\n";
 
    my $cfg;
-   open(FH, "<$kolab_prefix/etc/rc.conf") || die;
+   my $confname = "$kolab_prefix/etc/kolab/rc.conf";
+   copy("$kolab_prefix/etc/kolab/templates/rc.conf.template", $confname) || die "could not write to $confname";
+   open(FH, "<$confname") || die;
    $cfg .= $_ while (<FH>);
    close(FH);
 
    $cfg =~ s/\n((openldap_url|sasl_authmech)\S*=[^\n]*)/#$1\n/sg;
    $cfg .= "openldap_url=\"ldap:// ldaps://\"\nsasl_authmech=\"ldap\"\n";
 
-   open(FH, ">$kolab_prefix/etc/rc.conf") || die;
+   open(FH, ">$confname") || die;
    print FH $cfg;
    close(FH);
    undef $cfg;
@@ -750,7 +752,7 @@
 
   print "Updating configuration, please ignore any initial errors from kolabconf\n\n";
   my $cfg;
-  open(FH, "<$kolab_prefix/etc/rc.conf") || die;
+  open(FH, "<$kolab_prefix/etc/kolab/rc.conf") || die;
   $cfg .= $_ while (<FH>);
   close(FH);
   
@@ -758,7 +760,7 @@
   # $cfg .= "openldap_enable=\"no\"\nopenldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
   $cfg .= "\nopenldap_url=\"ldap:// ldaps://\"\nsasl_authmech=\"ldap\"\n";
   
-  open(FH, ">$kolab_prefix/etc/rc.conf") || die;
+  open(FH, ">$kolab_prefix/etc/kolab/rc.conf") || die;
   print FH $cfg;
   close(FH);
   undef $cfg;