mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-22 09:22:24 +00:00
Tidyups from merge
This commit is contained in:
parent
2af32a22d4
commit
4976b953bd
1 changed files with 45 additions and 46 deletions
|
@ -789,50 +789,49 @@ sub setup_helper_script() {
|
|||
warn("Running:$command\n"); # for debug purposes
|
||||
exec($command);
|
||||
};
|
||||
=======
|
||||
$helper_script = <<" HERE";
|
||||
my \$pipe=shift;
|
||||
my \$svr=shift;
|
||||
my \$user=shift;
|
||||
my \$port=shift;
|
||||
my \$mstr=shift;
|
||||
my \$command="$config{$config{comms}} $config{$config{comms}."_args"} ";
|
||||
open(PIPE, ">", \$pipe) or die("Failed to open pipe: \$!\\n");
|
||||
print PIPE "\$\$:\$ENV{WINDOWID}"
|
||||
or die("Failed to write to pipe: $!\\n");
|
||||
close(PIPE) or die("Failed to close pipe: $!\\n");
|
||||
if(\$svr =~ m/==\$/)
|
||||
{
|
||||
\$svr =~ s/==\$//;
|
||||
warn("\\nWARNING: failed to resolve IP address for \$svr.\\n\\n"
|
||||
);
|
||||
sleep 5;
|
||||
}
|
||||
if(\$mstr) {
|
||||
unless("$config{comms}" ne "console") {
|
||||
\$mstr = \$mstr ? "-M \$mstr " : "";
|
||||
\$command .= \$mstr;
|
||||
}
|
||||
}
|
||||
if(\$user) {
|
||||
unless("$config{comms}" eq "telnet") {
|
||||
\$user = \$user ? "-l \$user " : "";
|
||||
\$command .= \$user;
|
||||
}
|
||||
}
|
||||
if("$config{comms}" eq "telnet") {
|
||||
\$command .= "\$svr \$port";
|
||||
} else {
|
||||
if (\$port) {
|
||||
\$command .= "-p \$port \$svr";
|
||||
} else {
|
||||
\$command .= "\$svr";
|
||||
}
|
||||
}
|
||||
\$command .= " $config{command} || sleep 5";
|
||||
# warn("Running:\$command\\n"); # for debug purposes
|
||||
exec(\$command);
|
||||
HERE
|
||||
# $helper_script = <<" HERE";
|
||||
# my \$pipe=shift;
|
||||
# my \$svr=shift;
|
||||
# my \$user=shift;
|
||||
# my \$port=shift;
|
||||
# my \$mstr=shift;
|
||||
# my \$command="$config{$config{comms}} $config{$config{comms}."_args"} ";
|
||||
# open(PIPE, ">", \$pipe) or die("Failed to open pipe: \$!\\n");
|
||||
# print PIPE "\$\$:\$ENV{WINDOWID}"
|
||||
# or die("Failed to write to pipe: $!\\n");
|
||||
# close(PIPE) or die("Failed to close pipe: $!\\n");
|
||||
# if(\$svr =~ m/==\$/)
|
||||
# {
|
||||
# \$svr =~ s/==\$//;
|
||||
# warn("\\nWARNING: failed to resolve IP address for \$svr.\\n\\n"
|
||||
# );
|
||||
# sleep 5;
|
||||
# }
|
||||
# if(\$mstr) {
|
||||
# unless("$config{comms}" ne "console") {
|
||||
# \$mstr = \$mstr ? "-M \$mstr " : "";
|
||||
# \$command .= \$mstr;
|
||||
# }
|
||||
# }
|
||||
# if(\$user) {
|
||||
# unless("$config{comms}" eq "telnet") {
|
||||
# \$user = \$user ? "-l \$user " : "";
|
||||
# \$command .= \$user;
|
||||
# }
|
||||
# }
|
||||
# if("$config{comms}" eq "telnet") {
|
||||
# \$command .= "\$svr \$port";
|
||||
# } else {
|
||||
# if (\$port) {
|
||||
# \$command .= "-p \$port \$svr";
|
||||
# } else {
|
||||
# \$command .= "\$svr";
|
||||
# }
|
||||
# }
|
||||
# \$command .= " $config{command} || sleep 5";
|
||||
## warn("Running:\$command\\n"); # for debug purposes
|
||||
# exec(\$command);
|
||||
# HERE
|
||||
|
||||
# eval $helper_script || die ($@); # for debug purposes
|
||||
logmsg( 2, $helper_script );
|
||||
|
@ -849,9 +848,9 @@ sub open_client_windows(@) {
|
|||
my $server_object = App::ClusterSSH::Host->parse_host_string($_);
|
||||
|
||||
my $username = $server_object->get_username();
|
||||
$username = $config{user} if ( $config{user} );
|
||||
$username = $self->config->{user} if ( $self->config->{user} );
|
||||
my $port = $server_object->get_port();
|
||||
$port = $config{port} if ( $config{port} );
|
||||
$port = $self->config->{port} if ( $self->config->{port} );
|
||||
my $server = $server_object->get_hostname();
|
||||
my $master = $server_object->get_master();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue