Force remote mode refs #5597

This commit is contained in:
Kevin Duret 2014-06-06 08:43:34 +02:00
parent e2a0dd5b39
commit 070fb49046
2 changed files with 7 additions and 3 deletions

View File

@ -146,7 +146,7 @@ Check monitored paramaters by RecoveryPoint Appliance.
=item B<--hostname>
Hostname to query (need --remote).
Hostname to query.
=item B<--ssh-option>

View File

@ -50,7 +50,6 @@ sub new {
$options{options}->add_options(arguments =>
{
"hostname:s" => { name => 'hostname' },
"remote" => { name => 'remote' },
"ssh-option:s@" => { name => 'ssh_option' },
"ssh-path:s" => { name => 'ssh_path' },
"ssh-command:s" => { name => 'ssh_command', default => 'ssh' },
@ -68,6 +67,11 @@ sub check_options {
my ($self, %options) = @_;
$self->SUPER::init(%options);
if (!defined($self->{option_results}->{hostname})) {
$self->{output}->add_option_msg(short_msg => "Need to specify hostname.");
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{command})) {
$self->{output}->add_option_msg(short_msg => "Need to specify command option.");
$self->{output}->option_exit();
@ -127,7 +131,7 @@ Check system status.
=item B<--hostname>
Hostname to query (need --remote).
Hostname to query.
=item B<--ssh-option>