Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-08-26 21:27:00 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-08-26 21:27:00 +0300
commit7469b4aa7229bfe96e0620bfd0268d5e9dc71843 (patch)
tree4e42304f5e19730900c24b88841d5b25ab279cc5 /include/tests_containers
parentaa58736bd55207f0fc5cbb37dcab69c922983068 (diff)
[CONT-8106] support for newer 'docker info' output that includes additional space
Diffstat (limited to 'include/tests_containers')
-rw-r--r--include/tests_containers2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_containers b/include/tests_containers
index fb570fdb..cda52da7 100644
--- a/include/tests_containers
+++ b/include/tests_containers
@@ -137,7 +137,7 @@
# Check total of containers
LogText "Test: checking total amount of Docker containers"
- DOCKER_CONTAINERS_TOTAL=$(${DOCKERBINARY} info 2> /dev/null | ${GREPBINARY} "^Containers: " | ${AWKBINARY} '{ print $2 }')
+ DOCKER_CONTAINERS_TOTAL=$(${DOCKERBINARY} info 2> /dev/null | ${EGREPBINARY} "^[ \t]?Containers: " | ${AWKBINARY} '{ print $2 }')
if [ -z "${DOCKER_CONTAINERS_TOTAL}" ]; then
DOCKER_CONTAINERS_TOTAL=0
fi