Merge remote-tracking branch 'origin/ent-4772-omnishell' into ent-EDF
This commit is contained in:
commit
6126503285
|
@ -1731,28 +1731,48 @@ sub execute_command_timeout {
|
|||
# $std_files = ' >> /tmp/stdout 2>> /tmp/stderr
|
||||
################################################################################
|
||||
sub execute_command_block {
|
||||
my ($commands, $std_files, $timeout) = @_;
|
||||
my ($commands, $std_files, $timeout, $retry) = @_;
|
||||
|
||||
return 0 unless defined($commands);
|
||||
|
||||
my $retries = $retry;
|
||||
|
||||
$retries = 1 unless looks_like_number($retries) && $retries > 0;
|
||||
|
||||
my $err_level = 0;
|
||||
$std_files = '' unless defined ($std_files);
|
||||
|
||||
if (ref($commands) ne "ARRAY") {
|
||||
return 0 if $commands eq '';
|
||||
$err_level = execute_command_timeout(
|
||||
"($commands) $std_files",
|
||||
$timeout
|
||||
);
|
||||
|
||||
do {
|
||||
$err_level = execute_command_timeout(
|
||||
"($commands) $std_files",
|
||||
$timeout
|
||||
);
|
||||
|
||||
# Do not retry if success.
|
||||
last if looks_like_number($err_level) && $err_level == 0;
|
||||
} while ((--$retries) > 0);
|
||||
|
||||
} else {
|
||||
foreach my $comm (@{$commands}) {
|
||||
next unless defined($comm);
|
||||
$err_level = execute_command_timeout(
|
||||
"($comm) $std_files",
|
||||
$timeout
|
||||
);
|
||||
$retries = $retry;
|
||||
$retries = 1 unless looks_like_number($retries) && $retries > 0;
|
||||
|
||||
do {
|
||||
$err_level = execute_command_timeout(
|
||||
"($comm) $std_files",
|
||||
$timeout
|
||||
);
|
||||
|
||||
# Do not retry if success.
|
||||
last if looks_like_number($err_level) && $err_level == 0;
|
||||
|
||||
} while ((--$retries) > 0);
|
||||
|
||||
# Do not continue evaluating block if failed.
|
||||
last unless ($err_level == 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5416,6 +5416,14 @@ function get_help_info($section_name)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'omnishell':
|
||||
if ($es) {
|
||||
$result .= 'Omnishell&printable=yes';
|
||||
} else {
|
||||
$result .= 'Omnishell&printable=yes';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'module_type_tab':
|
||||
if ($es) {
|
||||
$result .= 'Operacion&printable=yes#Tipos_de_m.C3.B3dulos';
|
||||
|
|
Loading…
Reference in New Issue