Bug#513571: ctel: please provide a -p option to define a different default port
Err... yes. That's not the right behavior at all! Sorry for the inconvenience. Tony On Wed, 2009-02-18 at 10:27 +0100, Luk Claes wrote: > Hi > > Since the update I have to specify -p 22 when using cssh. I think it's > better to not use an explicit "" (empty?) port as default, but instead > don't invoke commands with -p if the port is not set. > > Cheers > > Luk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#513571: ctel: please provide a -p option to define a different default port
Hi Since the update I have to specify -p 22 when using cssh. I think it's better to not use an explicit "" (empty?) port as default, but instead don't invoke commands with -p if the port is not set. Cheers Luk -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#513571: ctel: please provide a -p option to define a different default port
Thank you for the bug report and the patch! I'm going to confer with the upstream author to make sure that -p is acceptable and will prepare an update for the Debian package. Cheers, Tony On Fri, 2009-01-30 at 12:13 +0100, Gerfried Fuchs wrote: > * Gerfried Fuchs [2009-01-30 11:23:48 CET]: > > When using ctel to test e.g. some mail servers for consistency, it's > > quite inconvenient to have to put :25 after every single host. It would > > be quite helpful if it's possible to be able to specify a different > > default port through a -p switch. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#513571: ctel: please provide a -p option to define a different default port
tags 513571 + patch thanks * Gerfried Fuchs [2009-01-30 11:23:48 CET]: > When using ctel to test e.g. some mail servers for consistency, it's > quite inconvenient to have to put :25 after every single host. It would > be quite helpful if it's possible to be able to specify a different > default port through a -p switch. I have quickly hacked together a patch for this thing, it should be quite straight-forward: #v+ $> diff -ub /usr/bin/ctel.orig /usr/bin/ctel --- /usr/bin/ctel.orig 2008-10-01 06:22:34.0 +0200 +++ /usr/bin/ctel 2009-01-30 11:53:15.0 +0100 @@ -86,7 +86,7 @@ my $scriptname = $0; $scriptname =~ s!.*/!!;# get the script name, minus the path -my $options = 'dDv?hHuqQgGist:T:c:l:o:e:';# Command line options list +my $options = 'dDv?hHuqQgGist:T:c:l:o:e:p:';# Command line options list my %options; my %config; my $debug = 0; @@ -778,6 +778,7 @@ 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; @@ -801,17 +802,13 @@ \$command .= \$user; } } - if(\$port) { if("$config{comms}" eq "telnet") { - \$port = \$port ? "\$port" : ""; + \$port = \$port ? "\$port" : "$defaultport"; \$command .= "\$svr \$port"; } else { - \$port = \$port ? "-p \$port" : ""; + \$port = \$port ? "-p \$port" : "$defaultport"; \$command .= "\$port \$svr"; } - } else { - \$command .= "\$svr"; - } \$command .= " || sleep 5"; # warn("Running:\$command\\n"); # for debug purposes exec(\$command); #v- I wasn't even sure why the helper_script should check for a handed over port when in the contained block $port will be checked explicitly for being defined anyway. ;) Given the way exec is called in the end it doesn't matter for multiple whitespace in between, but personally I would suggest to try an approach of handing over an array to exec() instead of a string, to avoid possible pitfalls. I just went this approach to make the diff as small as possible. :) So long, and thanks! Rhonda -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#513571: ctel: please provide a -p option to define a different default port
Package: clusterssh Version: 3.22-2 Severity: wishlist Hi! When using ctel to test e.g. some mail servers for consistency, it's quite inconvenient to have to put :25 after every single host. It would be quite helpful if it's possible to be able to specify a different default port through a -p switch. Thanks. :) Rhonda -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org