steffen: server/kolab/kolab kolab_bootstrap,1.25,1.26

cvs at intevation.de cvs at intevation.de
Tue May 25 13:56:05 CEST 2004


Author: steffen

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

Modified Files:
	kolab_bootstrap 
Log Message:
bootstrap fixlet

Index: kolab_bootstrap
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_bootstrap,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- kolab_bootstrap	25 May 2004 02:01:52 -0000	1.25
+++ kolab_bootstrap	25 May 2004 11:56:03 -0000	1.26
@@ -27,6 +27,7 @@
 use Term::ReadKey;
 
 my $kolab_prefix = "@l_prefix@";
+#my $kolab_prefix = "/kolab";
 my $kolab_config = $kolab_prefix."/etc/kolab/kolab.conf";
 
 # Fetch entry from ldap server or create new entry of none exist
@@ -89,7 +90,8 @@
 
 print "Do you want to set up (1) a master Kolab server or (2) a slave [$tmp]: ";
 my $tmp2 = ReadLine;
-if ( $tmp2 == 2 || ( !$tmp2 && $tmp == 2 ) ) {
+chomp $tmp2;
+if ( $tmp2 eq "2" || ( !$tmp2 && $tmp eq "2" ) ) {
   $is_master = "false";
   print "Proceeding with slave server setup\n\n";
 } else {
@@ -127,7 +129,7 @@
       print " bind_dn : $bind_dn\n";
     }
     if ($bind_pw =~ /\@\@\@/) {
-      $bind_pw = `@l_prefix@/bin/openssl passwd kolab`;
+      $bind_pw = `$kolab_prefix/bin/openssl passwd kolab`;
       chomp $bind_pw;
       print "Please choose a manager password [$bind_pw]: ";
       my $tmp = ReadLine;
@@ -141,7 +143,7 @@
       $php_dn =~ s/\@\@\@kolab_basedn\@\@\@/$base_dn/g;
     }
     if ($php_pw =~ /\@\@\@/) {
-      $php_pw = `@l_prefix@/bin/openssl passwd nobody`;
+      $php_pw = `$kolab_prefix/bin/openssl passwd nobody`;
       chomp $php_pw;
     }
 
@@ -328,14 +330,14 @@
    print "Create initial config files for postfix, apache, proftpd, cyrus imap, saslauthd\n"; 
 
    my $cfg;
-   open(FH, "<@l_prefix@/etc/rc.conf") || die;
+   open(FH, "<$kolab_prefix/etc/rc.conf") || die;
    $cfg .= $_ while (<FH>);
    close(FH);
 
    $cfg =~ s/\n((openldap_url|sasl_authmech)\S*=[^\n]*)/#\1\n/sg;
    $cfg .= "openldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
 
-   open(FH, ">@l_prefix@/etc/rc.conf") || die;
+   open(FH, ">$kolab_prefix/etc/rc.conf") || die;
    print FH $cfg;
    close(FH);
    undef $cfg;
@@ -403,14 +405,14 @@
 
     print "Updating configuration, please ignore any initial errors from kolabconf\n\n";
     my $cfg;
-    open(FH, "<@l_prefix@/etc/rc.conf") || die;
+    open(FH, "<$kolab_prefix/etc/rc.conf") || die;
     $cfg .= $_ while (<FH>);
     close(FH);
     
     $cfg =~ s/\n((openldap_url|sasl_authmech)\S*=[^\n]*)/#\1\n/sg;
     $cfg .= "openldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
     
-    open(FH, ">@l_prefix@/etc/rc.conf") || die;
+    open(FH, ">$kolab_prefix/etc/rc.conf") || die;
     print FH $cfg;
     close(FH);
     undef $cfg;





More information about the commits mailing list