thomas: server/perl-kolab/sbin kolab_bootstrap.in,1.4,1.5
cvs at kolab.org
cvs at kolab.org
Tue Feb 10 14:10:32 CET 2009
Author: thomas
Update of /kolabrepository/server/perl-kolab/sbin
In directory doto:/tmp/cvs-serv18098/perl-kolab/sbin
Modified Files:
kolab_bootstrap.in
Log Message:
Improved the ssh handling for slave setups in kolab_bootstrap.
Index: kolab_bootstrap.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/sbin/kolab_bootstrap.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- kolab_bootstrap.in 10 Feb 2009 11:58:18 -0000 1.4
+++ kolab_bootstrap.in 10 Feb 2009 13:10:30 -0000 1.5
@@ -743,7 +743,9 @@
my $master_host = $ldapuri->host();
print "Reading nobody and calendar passwords from master, please type in master server's root password when asked\n";
- open( CONF, "ssh -C $master_host 'cat @CONFIG_DIR@/kolab.conf'|");
+ my $get_master_conf = "ssh -C $master_host 'cat @CONFIG_DIR@/kolab.conf'";
+ print "$get_master_conf\n";
+ open( CONF, "$get_master_conf|");
my $conf;
$conf .= $_ while(<CONF>);
close(CONF);
@@ -781,9 +783,10 @@
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 -CA $master_host $Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop");
- kolab_system("ssh -CA $master_host $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pcf - openldap-data | $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pxf -");
- kolab_system("ssh -CA $master_host $Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} start");
+ kolab_system("ssh -C $master_host \'$Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop".
+ " && $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pcf - openldap-data".
+ " && $Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} start\'".
+ " | $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pxf -");
}
# FIXME: we should get rid of this construct because it makes the code hard to read.
@@ -834,9 +837,9 @@
kolab_system("$Kolab::config{'kolab_scriptsdir'}/kolab_ca.sh -newreq $fqdn @CONFIG_DIR@/key.pem @CONFIG_DIR@/newreq.pem ");
# Log into master and sign cert request
kolab_system("scp @CONFIG_DIR@/newreq.pem $master_host:@CONFIG_DIR@/$fqdn-req.pem");
- kolab_system("ssh -CA $master_host \"$Kolab::config{'kolab_scriptsdir'}/kolab_ca.sh -sign @CONFIG_DIR@/$fqdn-req.pem @CONFIG_DIR@/$fqdn.pem;\"");
+ kolab_system("ssh -C $master_host \"$Kolab::config{'kolab_scriptsdir'}/kolab_ca.sh -sign @CONFIG_DIR@/$fqdn-req.pem @CONFIG_DIR@/$fqdn.pem;\"");
kolab_system("scp $master_host:@CONFIG_DIR@/$fqdn.pem @CONFIG_DIR@/cert.pem");
- kolab_system("ssh -CA $master_host \"rm @CONFIG_DIR@/$fqdn.pem @CONFIG_DIR@/$fqdn-req.pem\"");
+ kolab_system("ssh -C $master_host \"rm @CONFIG_DIR@/$fqdn.pem @CONFIG_DIR@/$fqdn-req.pem\"");
die("Creation of @CONFIG_DIR@/cert.pem failed") unless -f "@CONFIG_DIR@/cert.pem";
kolab_system("chgrp $Kolab::config{'ldapserver_rgrp'} @CONFIG_DIR@/key.pem;");
kolab_system("chmod 0640 @CONFIG_DIR@/key.pem;");
More information about the commits
mailing list