thomas: server/perl-kolab/sbin kolab_bootstrap.in,1.5,1.6

cvs at kolab.org cvs at kolab.org
Tue Feb 10 14:39:57 CET 2009


Author: thomas

Update of /kolabrepository/server/perl-kolab/sbin
In directory doto:/tmp/cvs-serv18776

Modified Files:
	kolab_bootstrap.in 
Log Message:
whitespace/tab cleanup


Index: kolab_bootstrap.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/sbin/kolab_bootstrap.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- kolab_bootstrap.in	10 Feb 2009 13:10:30 -0000	1.5
+++ kolab_bootstrap.in	10 Feb 2009 13:39:55 -0000	1.6
@@ -164,7 +164,7 @@
     my $uid = getpwnam($u);
     my $gid = getgrnam($g);
     while( my $file = shift ) {
-	chown $uid,$gid,$file;
+        chown $uid,$gid,$file;
     }
 }
 
@@ -192,7 +192,7 @@
 
   my $ldapobject = newOrExistingLDAPEntry($ldap,"cn=$cn,$basedn");
   $ldapobject->replace('cn' => $cn, 'objectclass' => ['top','kolabgroupofnames'],
-		       'member' => @_);
+                       'member' => @_);
   $ldapobject->dn("cn=$cn,$basedn");
   my $mesg = $ldapobject->update($ldap);
   $mesg && $mesg->code && warn "failed to write entry: ", $mesg->error;
@@ -311,7 +311,7 @@
 }
 
 my $tmp2 = getUserInput( "Do you want to set up (1) a master Kolab server or (2) a slave",
-			 $tmp, "1", "2");
+                         $tmp, "1", "2");
 if ( $tmp2 eq "2" ) {
   $is_master = "false";
   print "Proceeding with slave server setup\n\n";
@@ -332,7 +332,7 @@
   $domain = getUserInput("Please enter your Maildomain - if you do not know your mail domain use the fqdn from above", $domain);
   print "proceeding with Maildomain $domain\n";
   print "Kolab primary email addresses will be of the type user\@$domain \n";
-  
+
 
   if ( $opt_f || $base_dn =~ /\@\@\@/ || $bind_dn =~ /\@\@\@/ || $bind_pw =~ /\@\@\@/ ) {
     print "Generating default configuration:\n";
@@ -460,8 +460,8 @@
       if ($mesg && $mesg->count != 1) {
         print "no $base_dn object found, creating one\n";
         $base_dn =~ m/([^=]+)=([^,]+)/;
-	my @attrs = ( $1 => $2, 'objectclass'=> ['top', 'domain'] );
-	@attrs = ( @attrs, 'dc' => (split(/,/,$domain))[0] ) if( $1 ne 'dc' );
+        my @attrs = ( $1 => $2, 'objectclass'=> ['top', 'domain'] );
+        @attrs = ( @attrs, 'dc' => (split(/,/,$domain))[0] ) if( $1 ne 'dc' );
         $mesg = $ldap->add( $base_dn, attr=> \@attrs);
       }
       $mesg && $mesg->code && warn "failed to write basedn entry : ", $mesg->error;
@@ -556,8 +556,8 @@
       # create php read-only user
       $ldapobject = newOrExistingLDAPEntry( $ldap, "cn=nobody,cn=internal,$base_dn" );
       $ldapobject->replace('cn' => 'nobody', 'sn' => 'n/a n/a', 'uid' => 'nobody',
-                           'userPassword' => hashPassword($php_pw), 
-			   'objectclass' => ['top','inetorgperson','kolabinetorgperson']);
+                           'userPassword' => hashPassword($php_pw),
+                           'objectclass' => ['top','inetorgperson','kolabinetorgperson']);
       $ldapobject->dn("cn=nobody,cn=internal,$base_dn");
       $mesg = $ldapobject->update($ldap);
       $mesg && $mesg->code && warn "failed to write entry: ", $mesg->error;
@@ -566,8 +566,8 @@
       # create calendar user
       $ldapobject = newOrExistingLDAPEntry( $ldap, "cn=$calendar_id@" . $domain . ",cn=internal,$base_dn" );
       $ldapobject->replace('cn' => $calendar_id . '@' . $domain, 'sn' => 'n/a n/a', 'uid' => $calendar_id . '@' . $domain,
-                           'userPassword' => hashPassword($calendar_pw), 
-			   'objectclass' => ['top','inetorgperson','kolabinetorgperson']);
+                           'userPassword' => hashPassword($calendar_pw),
+                           'objectclass' => ['top','inetorgperson','kolabinetorgperson']);
       $ldapobject->dn("cn=$calendar_id@" . $domain . ",cn=internal,$base_dn");
       $mesg = $ldapobject->update($ldap);
       $mesg && $mesg->code && warn "failed to write entry: ", $mesg->error;
@@ -676,9 +676,8 @@
   # For now we just connect to the remote slapd
  SLAVESTART:
   print "Now some information about the master LDAP server is required:\n\n";
-  do { 
-      $ldap_uri = getUserInput("URI of master LDAP server (for example ldaps://host.example.com)", 
-			       "");
+  do {
+      $ldap_uri = getUserInput("URI of master LDAP server (for example ldaps://host.example.com)", "");
   } until $ldap_uri;
   my $ldapuri = URI->new($ldap_uri) || warn "error: could not parse given uri";
   if( $ldapuri ) {
@@ -725,7 +724,7 @@
   #$calendar_pw = $entry->get_value( 'userPassword' );
 
   $mesg = $ldap->search(base=> "k=kolab,$base_dn", scope=> 'exact',
-			filter=> "(objectClass=*)");
+                        filter=> "(objectClass=*)");
   if ($mesg && $mesg->count != 1) {
     print "No Kolab object found, please check your input\n";
     goto SLAVESTART;
@@ -733,7 +732,7 @@
   my $kolabhosts = $mesg->entry(0)->get_value( 'kolabhost', asref => 1 );
   foreach(@$kolabhosts) {
     if( lc($_) eq lc($fqdn) ) {
-	goto SLAVEOK;
+        goto SLAVEOK;
     }
   }
   print "$fqdn is not listed on the master, please correct that and try again\n";
@@ -780,7 +779,7 @@
   if ($kolab_config{'directory_mode'} ne "syncrepl" ) {
     print << 'EOS';
 Now the master server needs to be stopped briefly while the contents of the LDAP database
-is copied over to this slave. Please make sure that this slave is entered into the list 
+is copied over to this slave. Please make sure that this slave is entered into the list
 of kolabhosts on the master before proceeding.
 EOS
     kolab_system("ssh -C $master_host \'$Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop".
@@ -797,24 +796,24 @@
     open(FH, "<$Kolab::config{'sysconfdir'}/rc.conf") || die;
     $cfg .= $_ while (<FH>);
     close(FH);
-    
+
     $cfg =~ s/\n((openldap_url|sasl_authmech|openldap_enable)\S*=[^\n]*)/#$1\n/sg;
     # $cfg .= "openldap_enable=\"no\"\nopenldap_url=\"\"\nsasl_authmech=\"ldap\"\n";
     $cfg .= "\nopenldap_url=\"ldap:// ldaps://\"\nsasl_authmech=\"ldap\"\n";
-    
+
     open(FH, ">$Kolab::config{'sysconfdir'}/rc.conf") || die;
     print FH $cfg;
     close(FH);
     undef $cfg;
   }
-  
+
   print <<'EOS';
 If you chose to create a CA on the master server, you will now need to create
 a certificate request and copy it to the master to get it signed. If you already
 have a certificate for this server, you can choose to skip this section.
 EOS
-  my $tmp = getUserInput( "Do you want to create a certificate request and sign it", 
-			  "y", "y", "n");
+  my $tmp = getUserInput( "Do you want to create a certificate request and sign it",
+                          "y", "y", "n");
   if( lc $tmp eq 'n' ) {
     print <<'EOS';
 Skipping certificate creation. Please copy your certificate to
@@ -823,7 +822,7 @@
 
 EOS
   } else {
-    
+
     print <<'EOS';
 Now we need to create a cerificate request for this slave
 and then ssh to the master server to have the request signed.
@@ -845,7 +844,7 @@
     kolab_system("chmod 0640 @CONFIG_DIR@/key.pem;");
     kolab_system("chgrp $Kolab::config{'ldapserver_rgrp'} @CONFIG_DIR@/cert.pem;");
     kolab_system("chmod 0640 @CONFIG_DIR@/cert.pem;");
-    
+
     print <<'EOS';
 ################################################################################
 Certificate creation done!





More information about the commits mailing list