mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-22 09:22:24 +00:00
More generated and localised pod
This commit is contained in:
parent
8990956ad4
commit
b33f3ffb13
2 changed files with 47 additions and 8 deletions
|
@ -26,6 +26,10 @@ sub new {
|
|||
|
||||
#my %command_options = (
|
||||
$self->{command_options} = {
|
||||
'autoclose|K=i' => {
|
||||
arg_desc => 'seconds',
|
||||
help => $self->loc('Number of seconds to wait before closing finished terminal windows.'),
|
||||
},
|
||||
'autoquit|q' =>{
|
||||
help => $self->loc('Enable automatically quiting after the last client window has closed (overriding the config file). See also L<--no-autoquit>'),
|
||||
},
|
||||
|
@ -60,6 +64,7 @@ sub add_option {
|
|||
return $self;
|
||||
}
|
||||
|
||||
# For options common to ssh sessions
|
||||
sub add_common_ssh_options {
|
||||
my ( $self ) = @_;
|
||||
|
||||
|
@ -76,15 +81,16 @@ sub add_common_ssh_options {
|
|||
return $self;
|
||||
}
|
||||
|
||||
# For options that work in ssh, rsh type consoles, but not telnet or console
|
||||
sub add_common_session_options {
|
||||
my ( $self ) = @_;
|
||||
|
||||
$self->add_option(
|
||||
spec => 'action|a=s',
|
||||
help => $self->loc("Run the command in each session, e.g. C<-a 'vi /etc/hosts'> to drop straight into a vi session.");
|
||||
arg_desc => 'command',
|
||||
help => $self->loc("Run the command in each session, e.g. C<-a 'vi /etc/hosts'> to drop straight into a vi session."),
|
||||
);
|
||||
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
@ -114,8 +120,14 @@ sub getopts {
|
|||
print "S<< $Script $self->{usage} >>",$/,$/;
|
||||
print '=head1 ',$self->loc('DESCRIPTION'),$/,$/;
|
||||
print $self->loc("_DESCRIPTION"),$/,$/;
|
||||
print '=head1 '.$self->loc('Further Notes'),$/,$/;
|
||||
print '=head2 '.$self->loc('Further Notes'),$/,$/;
|
||||
print $self->loc("_FURTHER_NOTES"),$/,$/;
|
||||
print '=over',$/,$/;
|
||||
for (1 .. 6) {
|
||||
print '=item *',$/,$/;
|
||||
print $self->loc("_FURTHER_NOTES_".$_),$/,$/;
|
||||
}
|
||||
print '=back',$/,$/;
|
||||
print '=head1 '.$self->loc('OPTIONS'),$/,$/;
|
||||
print $self->loc("_OPTIONS"),$/,$/;
|
||||
|
||||
|
@ -125,9 +137,21 @@ sub getopts {
|
|||
|
||||
my ($option, $arg) = $longopt =~ m/^(.*?)(?:[=:](.*))?$/;
|
||||
if($arg) {
|
||||
my $arg_desc;
|
||||
if(my $desc=$self->{command_options}->{$longopt}->{arg_desc}) {
|
||||
$arg_desc="<$desc>";
|
||||
}
|
||||
$arg=~s/\+/[[...] || <INTEGER>]/g;
|
||||
$arg=~s/i/<INTEGER>/g;
|
||||
$arg=~s/s/<STRING>/g;
|
||||
$arg = $arg_desc || '<INTEGER>' if($arg eq 'i');
|
||||
if($arg eq 's'){
|
||||
if($arg_desc) {
|
||||
$arg = "'$arg_desc'";
|
||||
} else {
|
||||
$arg = "'<STRING>'" ;
|
||||
}
|
||||
}
|
||||
#$arg=~s/i/<INTEGER>/g;
|
||||
#$arg=~s/s/<STRING>/g;
|
||||
}
|
||||
my $desc;
|
||||
foreach my $item ( split /\|/, $option) {
|
||||
|
|
|
@ -10,10 +10,25 @@ Connections are opened via ssh, so a correctly installed and configured ssh inst
|
|||
|
||||
Extra caution should be taken when editing system files such as /etc/inet/hosts as lines may not necessarily be in the same order. Assuming line 5 is the same across all servers and modifying that is dangerous. It's better to search for the specific line to be changed and double-check before changes are committed.},
|
||||
|
||||
'_FURTHER_NOTES' => q{Further Notes},
|
||||
'_OPTIONS' => q{Some of these options may also be defined within the configuration file.
|
||||
'_FURTHER_NOTES' => q{Please also see "KNOWN BUGS".},
|
||||
|
||||
Default options are shown as appropriate.
|
||||
'_FURTHER_NOTES_1' => q{The dotted line on any sub-menu is a tear-off, i.e. click on it and the sub-menu is turned into its own window.},
|
||||
|
||||
'_FURTHER_NOTES_2' => q{Unchecking a hostname on the Hosts sub-menu will unplug the host from the cluster control window, so any text typed into the console is not sent to that host. Re-selecting it will plug it back in.},
|
||||
|
||||
'_FURTHER_NOTES_3' => q{If your window manager menu bars are obscured by terminal windows see the C<screen_reserve_XXXXX> options in the F<$HOME/.clusterssh/config> file (see L</"FILES">).},
|
||||
|
||||
'_FURTHER_NOTES_4' => q{If the terminals overlap too much see the C<terminal_reserve_XXXXX> options in the F<$HOME/.clusterssh/config> file (see L</"FILES">).},
|
||||
|
||||
'_FURTHER_NOTES_5' => q{When using cssh on a large number of systems to connect back to a single system (e.g. you issue a command to the cluster to scp a file from a given location) and when these connections require authentication (i.e. you are going to authenticate with a password), the sshd daemon at that location may refuse connects after the number specified by MaxStartups in sshd_config is exceeded. (If this value is not set, it defaults to 10.) This is expected behavior; sshd uses this mechanism to prevent DoS attacks from unauthenticated sources. Please tune sshd_config and reload the SSH daemon, or consider using the ~/.ssh/authorized_keys mechanism for authentication if you encounter this problem.},
|
||||
|
||||
'_FURTHER_NOTES_6' => q{If client windows fail to open, try running:
|
||||
|
||||
C<< cssh -e {single host name} >>
|
||||
|
||||
This will test the mechanisms used to open windows to hosts. This could be due to either the C<-xrm> terminal option which enables C<AllowSendEvents> (some terminals do not require this option, other terminals have another method for enabling it - see your terminal documentation) or the C<ConnectTimeout> ssh option (see the configuration option C<-o> or file C<$HOME/.clusterssh/config> below to resolve this).},
|
||||
|
||||
'_OPTIONS' => q{Some of these options may also be defined within the configuration file. Default options are shown as appropriate.
|
||||
},
|
||||
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue