mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 09:53:23 +00:00
Fix helper script and defaultport usage
This commit is contained in:
parent
1d85a21872
commit
1325c6aead
2 changed files with 7 additions and 9 deletions
|
@ -7,6 +7,7 @@
|
|||
* Rearrange pod documentation to remove extraenous comment (Tony Mancill)
|
||||
* Cope better with IPv6 addresses
|
||||
* Fix bug with passing arguments from command line to comms method binary
|
||||
* Rework defaultport code
|
||||
|
||||
2009-03-26 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.25-1
|
||||
|
||||
|
|
|
@ -828,7 +828,6 @@ sub send_resizemove($$$$$) {
|
|||
|
||||
sub setup_helper_script() {
|
||||
logmsg( 2, "Setting up helper script" );
|
||||
my $defaultport = ( defined $options{p} ) ? $options{p} : "";
|
||||
$helper_script = <<" HERE";
|
||||
my \$pipe=shift;
|
||||
my \$svr=shift;
|
||||
|
@ -852,13 +851,11 @@ sub setup_helper_script() {
|
|||
\$command .= \$user;
|
||||
}
|
||||
}
|
||||
if($config{comms} eq "telnet") {
|
||||
\$port = \$port ? "\$port" : "$defaultport";
|
||||
if("$config{comms}" eq "telnet") {
|
||||
\$command .= "\$svr \$port";
|
||||
} else {
|
||||
if ((\$port) || ("$defaultport" ne "")) {
|
||||
\$port = \$port ? "-p \$port" : "-p $defaultport";
|
||||
\$command .= "\$port \$svr";
|
||||
if (\$port) {
|
||||
\$command .= "-p \$port \$svr";
|
||||
} else {
|
||||
\$command .= "\$svr";
|
||||
}
|
||||
|
@ -932,7 +929,7 @@ sub split_hostname {
|
|||
}
|
||||
}
|
||||
|
||||
$port ||= q{};
|
||||
$port ||= defined $options{p} ? $options{p} : q{};
|
||||
$username ||= q{};
|
||||
|
||||
logmsg( 3, "username=$username, server=$server, port=$port" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue