diff --git a/clusterssh/ChangeLog b/clusterssh/ChangeLog index 0b956db..f16130d 100644 --- a/clusterssh/ChangeLog +++ b/clusterssh/ChangeLog @@ -3,6 +3,7 @@ * Allow user to set a different ConnectTimeout and -o string (Tony Mancill) * Fix warning from 'mandb' (Tony Mancill) * Continue connecting to unresolvable hosts (debian bug 499935) (Tony Mancill) +* Correct bug with unset default ports (Tony Mancill) 2009-03-26 Duncan Ferguson - v3.25-1 diff --git a/clusterssh/src/cssh.pl b/clusterssh/src/cssh.pl index b7bdd67..da76781 100755 --- a/clusterssh/src/cssh.pl +++ b/clusterssh/src/cssh.pl @@ -849,8 +849,12 @@ sub setup_helper_script() { \$port = \$port ? "\$port" : "$defaultport"; \$command .= "\$svr \$port"; } else { - \$port = \$port ? "-p \$port" : "-p $defaultport"; - \$command .= "\$port \$svr"; + if ((\$port) || ("$defaultport" ne "")) { + \$port = \$port ? "-p \$port" : "-p $defaultport"; + \$command .= "\$port \$svr"; + } else { + \$command .= "\$svr"; + } } \$command .= " || sleep 5"; # warn("Running:\$command\\n"); # for debug purposes