mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 07:15:07 +02:00
Replaced -z for empty string testing
This commit is contained in:
parent
afe30cf3a7
commit
d1ae757240
@ -119,7 +119,7 @@
|
|||||||
# Check total of containers
|
# Check total of containers
|
||||||
logtext "Test: checking total amount of Docker containers"
|
logtext "Test: checking total amount of Docker containers"
|
||||||
DOCKER_CONTAINERS_TOTAL=`${DOCKERBINARY} info 2> /dev/null | grep "^Containers: " | awk '{ print $2 }'`
|
DOCKER_CONTAINERS_TOTAL=`${DOCKERBINARY} info 2> /dev/null | grep "^Containers: " | awk '{ print $2 }'`
|
||||||
if [ ${DOCKER_CONTAINERS_TOTAL} -z ]; then
|
if [ "${DOCKER_CONTAINERS_TOTAL}" = "" ]; then
|
||||||
DOCKER_CONTAINERS_TOTAL=0
|
DOCKER_CONTAINERS_TOTAL=0
|
||||||
fi
|
fi
|
||||||
logtext "Result: docker info shows ${DOCKER_CONTAINERS_TOTAL} containers"
|
logtext "Result: docker info shows ${DOCKER_CONTAINERS_TOTAL} containers"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user