mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 09:53:23 +00:00
Look for usernames when adding clusters
Removes and stores the username portion of a server before checking if it's a cluster or not to allow dynamic username selection in the GUI too.
This commit is contained in:
parent
cbb31ca09c
commit
d604feee25
3 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.28
|
||||||
|
|
||||||
|
* Look for usernames when adding clusters
|
||||||
|
- Thanks to Kristian Lyngstol for the patch
|
||||||
|
|
||||||
2009-09-24 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.27
|
2009-09-24 Duncan Ferguson <duncan_ferguson@user.sf.net> - v3.27
|
||||||
|
|
||||||
* Add in list of clusters to 'Add Host' window
|
* Add in list of clusters to 'Add Host' window
|
||||||
|
|
1
THANKS
1
THANKS
|
@ -30,5 +30,6 @@ Bogdan Pintea
|
||||||
Gerfried Fuchs
|
Gerfried Fuchs
|
||||||
Stanislas Rouvelin
|
Stanislas Rouvelin
|
||||||
Sami Kerola
|
Sami Kerola
|
||||||
|
Kristian Lyngstol
|
||||||
|
|
||||||
$Id$
|
$Id$
|
||||||
|
|
12
src/cssh.pl
12
src/cssh.pl
|
@ -689,10 +689,18 @@ sub resolve_names(@) {
|
||||||
my @servers = @_;
|
my @servers = @_;
|
||||||
|
|
||||||
foreach (@servers) {
|
foreach (@servers) {
|
||||||
|
my $dirty = $_;
|
||||||
|
my $username = "";
|
||||||
|
my $node;
|
||||||
logmsg( 3, "Found server $_" );
|
logmsg( 3, "Found server $_" );
|
||||||
|
|
||||||
if ( $clusters{$_} ) {
|
if ( $dirty =~ s/^(.*)@// ) {
|
||||||
push( @servers, split( / /, $clusters{$_} ) );
|
$username = $1;
|
||||||
|
}
|
||||||
|
if ( $clusters{$dirty} ) {
|
||||||
|
foreach $node (split( / /, $clusters{$dirty})) {
|
||||||
|
push( @servers, $username . "@" . $node );
|
||||||
|
}
|
||||||
$_ = "";
|
$_ = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue