mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 09:53:23 +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
|
warn("Running:$command\n"); # for debug purposes
|
||||||
exec($command);
|
exec($command);
|
||||||
};
|
};
|
||||||
=======
|
# $helper_script = <<" HERE";
|
||||||
$helper_script = <<" HERE";
|
# my \$pipe=shift;
|
||||||
my \$pipe=shift;
|
# my \$svr=shift;
|
||||||
my \$svr=shift;
|
# my \$user=shift;
|
||||||
my \$user=shift;
|
# my \$port=shift;
|
||||||
my \$port=shift;
|
# my \$mstr=shift;
|
||||||
my \$mstr=shift;
|
# my \$command="$config{$config{comms}} $config{$config{comms}."_args"} ";
|
||||||
my \$command="$config{$config{comms}} $config{$config{comms}."_args"} ";
|
# open(PIPE, ">", \$pipe) or die("Failed to open pipe: \$!\\n");
|
||||||
open(PIPE, ">", \$pipe) or die("Failed to open pipe: \$!\\n");
|
# print PIPE "\$\$:\$ENV{WINDOWID}"
|
||||||
print PIPE "\$\$:\$ENV{WINDOWID}"
|
# or die("Failed to write to pipe: $!\\n");
|
||||||
or die("Failed to write to pipe: $!\\n");
|
# close(PIPE) or die("Failed to close pipe: $!\\n");
|
||||||
close(PIPE) or die("Failed to close pipe: $!\\n");
|
# if(\$svr =~ m/==\$/)
|
||||||
if(\$svr =~ m/==\$/)
|
# {
|
||||||
{
|
# \$svr =~ s/==\$//;
|
||||||
\$svr =~ s/==\$//;
|
# warn("\\nWARNING: failed to resolve IP address for \$svr.\\n\\n"
|
||||||
warn("\\nWARNING: failed to resolve IP address for \$svr.\\n\\n"
|
# );
|
||||||
);
|
# sleep 5;
|
||||||
sleep 5;
|
# }
|
||||||
}
|
# if(\$mstr) {
|
||||||
if(\$mstr) {
|
# unless("$config{comms}" ne "console") {
|
||||||
unless("$config{comms}" ne "console") {
|
# \$mstr = \$mstr ? "-M \$mstr " : "";
|
||||||
\$mstr = \$mstr ? "-M \$mstr " : "";
|
# \$command .= \$mstr;
|
||||||
\$command .= \$mstr;
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# if(\$user) {
|
||||||
if(\$user) {
|
# unless("$config{comms}" eq "telnet") {
|
||||||
unless("$config{comms}" eq "telnet") {
|
# \$user = \$user ? "-l \$user " : "";
|
||||||
\$user = \$user ? "-l \$user " : "";
|
# \$command .= \$user;
|
||||||
\$command .= \$user;
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# if("$config{comms}" eq "telnet") {
|
||||||
if("$config{comms}" eq "telnet") {
|
# \$command .= "\$svr \$port";
|
||||||
\$command .= "\$svr \$port";
|
# } else {
|
||||||
} else {
|
# if (\$port) {
|
||||||
if (\$port) {
|
# \$command .= "-p \$port \$svr";
|
||||||
\$command .= "-p \$port \$svr";
|
# } else {
|
||||||
} else {
|
# \$command .= "\$svr";
|
||||||
\$command .= "\$svr";
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# \$command .= " $config{command} || sleep 5";
|
||||||
\$command .= " $config{command} || sleep 5";
|
## warn("Running:\$command\\n"); # for debug purposes
|
||||||
# warn("Running:\$command\\n"); # for debug purposes
|
# exec(\$command);
|
||||||
exec(\$command);
|
# HERE
|
||||||
HERE
|
|
||||||
|
|
||||||
# eval $helper_script || die ($@); # for debug purposes
|
# eval $helper_script || die ($@); # for debug purposes
|
||||||
logmsg( 2, $helper_script );
|
logmsg( 2, $helper_script );
|
||||||
|
@ -849,9 +848,9 @@ sub open_client_windows(@) {
|
||||||
my $server_object = App::ClusterSSH::Host->parse_host_string($_);
|
my $server_object = App::ClusterSSH::Host->parse_host_string($_);
|
||||||
|
|
||||||
my $username = $server_object->get_username();
|
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();
|
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 $server = $server_object->get_hostname();
|
||||||
my $master = $server_object->get_master();
|
my $master = $server_object->get_master();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue