Update 1_host_configuration.sh

Signed-off-by: Demian Ginther <st.diluted@gmail.com>
This commit is contained in:
Demian Ginther 2019-03-11 20:06:31 -06:00
parent f8be7239e5
commit 5b29cd5b10

View file

@ -18,14 +18,26 @@ check_1_1() {
totalChecks=$((totalChecks + 1))
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
pass "$check_1_1"
resulttestjson "PASS"
currentScore=$((currentScore + 1))
if [[ "$(docker info -f '{{ .SecurityOptions }}')" =~ .*userns.* ]]; then
if mountpoint -q -- "$(dirname "$(docker info -f '{{ .DockerRootDir }}')")" >/dev/null 2>&1; then
pass "$check_1_1"
resulttestjson "PASS"
currentScore=$((currentScore + 1))
else
warn "$check_1_1"
resulttestjson "WARN"
currentScore=$((currentScore - 1))
fi
else
warn "$check_1_1"
resulttestjson "WARN"
currentScore=$((currentScore - 1))
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
pass "$check_1_1"
resulttestjson "PASS"
currentScore=$((currentScore + 1))
else
warn "$check_1_1"
resulttestjson "WARN"
currentScore=$((currentScore - 1))
fi
fi
}