mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 01:43:25 +00:00
Added '--list', '-L'
Added option to list available cluster tags (idea from Markus Manzke)
This commit is contained in:
parent
e2cc9a0863
commit
2aa655b38d
3 changed files with 16 additions and 0 deletions
1
Changes
1
Changes
|
@ -1,5 +1,6 @@
|
||||||
????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_06
|
????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_06
|
||||||
* Fix test error on 5.8.8 (reported by Wei Wang)
|
* Fix test error on 5.8.8 (reported by Wei Wang)
|
||||||
|
* Added '--list', '-L' to list available cluster tags (idea from Markus Manzke)
|
||||||
|
|
||||||
2010-06-20 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_05
|
2010-06-20 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_05
|
||||||
|
|
||||||
|
|
4
bin/cssh
4
bin/cssh
|
@ -164,6 +164,10 @@ Specify the font to use in the terminal windows. Use standard X font notation.
|
||||||
|
|
||||||
Show basic help text, and exit
|
Show basic help text, and exit
|
||||||
|
|
||||||
|
=item --list, -L
|
||||||
|
|
||||||
|
List available cluster tags.
|
||||||
|
|
||||||
=item --man,-H
|
=item --man,-H
|
||||||
|
|
||||||
Show full help test (the man page), and exit
|
Show full help test (the man page), and exit
|
||||||
|
|
|
@ -87,6 +87,7 @@ my @options_spec = (
|
||||||
'title|T=s',
|
'title|T=s',
|
||||||
'output-config|u',
|
'output-config|u',
|
||||||
'font|f=s',
|
'font|f=s',
|
||||||
|
'list|L',
|
||||||
);
|
);
|
||||||
my %options;
|
my %options;
|
||||||
my %config;
|
my %config;
|
||||||
|
@ -414,6 +415,12 @@ sub dump_config {
|
||||||
exit_prog if ( !$noexit );
|
exit_prog if ( !$noexit );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub list_tags {
|
||||||
|
print('Available cluster tags:',$/);
|
||||||
|
print "\t", $_, $/ foreach (sort(keys(%clusters)));
|
||||||
|
exit_prog;
|
||||||
|
}
|
||||||
|
|
||||||
sub check_ssh_hostnames {
|
sub check_ssh_hostnames {
|
||||||
return unless ( $config{method} eq "ssh" );
|
return unless ( $config{method} eq "ssh" );
|
||||||
|
|
||||||
|
@ -2152,6 +2159,8 @@ sub run {
|
||||||
|
|
||||||
get_clusters();
|
get_clusters();
|
||||||
|
|
||||||
|
list_tags() if ( $options{'list'} );
|
||||||
|
|
||||||
if (@ARGV) {
|
if (@ARGV) {
|
||||||
@servers = resolve_names(@ARGV);
|
@servers = resolve_names(@ARGV);
|
||||||
}
|
}
|
||||||
|
@ -2259,6 +2268,8 @@ the code until this time.
|
||||||
|
|
||||||
=item dump_config
|
=item dump_config
|
||||||
|
|
||||||
|
=item list_tags
|
||||||
|
|
||||||
=item evaluate_commands
|
=item evaluate_commands
|
||||||
|
|
||||||
=item exit_prog
|
=item exit_prog
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue