Compare commits
2 commits
345316947b
...
12ee40593c
Author | SHA1 | Date | |
---|---|---|---|
12ee40593c | |||
2c899048f6 |
1 changed files with 2 additions and 3 deletions
|
@ -361,15 +361,14 @@ function exec_in_container() {
|
||||||
# Implement check inside a function to allow running it in parallel
|
# Implement check inside a function to allow running it in parallel
|
||||||
# Parameters : [container] [output file]
|
# Parameters : [container] [output file]
|
||||||
function check_container() {
|
function check_container() {
|
||||||
local container="$1" output_file="$2" status="" check_plugin check_plugin_cmd=() status ex
|
local container="$1" output_file="$2" status="" check_plugin status ex
|
||||||
for check_plugin in "${!CHECK_PLUGINS[@]}"; do
|
for check_plugin in "${!CHECK_PLUGINS[@]}"; do
|
||||||
if ! exec_in_container "$container" test -e "$check_plugin" > /dev/null 2>&1; then
|
if ! exec_in_container "$container" test -e "$check_plugin" > /dev/null 2>&1; then
|
||||||
debug "$container - Plugin $check_plugin not found"
|
debug "$container - Plugin $check_plugin not found"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
debug "$container - Plugin $check_plugin found, use it"
|
debug "$container - Plugin $check_plugin found, use it"
|
||||||
read -ra check_plugin_cmd <<< "${CHECK_PLUGINS[${check_plugin}]}"
|
status="$( exec_in_container "$container" "${CHECK_PLUGINS[${check_plugin}]}" 2>&1 )"
|
||||||
status="$( exec_in_container "$container" "${check_plugin_cmd[@]}" 2>&1 )"
|
|
||||||
ex=$?
|
ex=$?
|
||||||
debug "$container - Plugin output: $status"
|
debug "$container - Plugin output: $status"
|
||||||
debug "$container - Plugin exit code: $ex"
|
debug "$container - Plugin exit code: $ex"
|
||||||
|
|
Loading…
Reference in a new issue