+ fix fujitsu eternus
This commit is contained in:
parent
8bdff17fea
commit
a01f3c80eb
|
@ -140,13 +140,24 @@ sub execute {
|
|||
$sub_cmd .= $options{command_path} . '/' if (defined($options{command_path}));
|
||||
$sub_cmd .= $options{command} . ' ' if (defined($options{command}));
|
||||
$sub_cmd .= $options{command_options} if (defined($options{command_options}));
|
||||
($lerror, $stdout, $exit_code) = backtick(
|
||||
# On some equipment. Cannot get a pseudo terminal
|
||||
if (defined($options{ssh_pipe}) && $options{ssh_pipe} == 1) {
|
||||
$cmd = "echo '" . $sub_cmd . "' | " . $cmd . ' ' . join(" ", @$args);
|
||||
($lerror, $stdout, $exit_code) = backtick(
|
||||
command => $cmd,
|
||||
timeout => $options{options}->{timeout},
|
||||
wait_exit => 1,
|
||||
redirect_stderr => 1
|
||||
);
|
||||
} else {
|
||||
($lerror, $stdout, $exit_code) = backtick(
|
||||
command => $cmd,
|
||||
arguments => [@$args, $sub_cmd],
|
||||
timeout => $options{options}->{timeout},
|
||||
wait_exit => 1,
|
||||
redirect_stderr => 1
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$cmd = 'sudo ' if (defined($options{sudo}));
|
||||
$cmd .= $options{command_path} . '/' if (defined($options{command_path}));
|
||||
|
|
|
@ -169,6 +169,7 @@ sub manage_selection {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
|
@ -113,6 +113,7 @@ sub run {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
|
@ -199,6 +199,7 @@ sub manage_selection {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
|
@ -107,6 +107,7 @@ sub run {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
|
@ -264,6 +264,7 @@ sub manage_selection {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
|
@ -259,6 +259,7 @@ sub manage_selection {
|
|||
|
||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
ssh_pipe => 1,
|
||||
command => $self->{option_results}->{command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => $self->{option_results}->{command_options});
|
||||
|
|
Loading…
Reference in New Issue