mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 08:42:33 +01:00
Made some minor changes after check with ShellCheck. Also fixed
sourcing and verified that things work right with bash -x. Signed-off-by: Scott McCarty <smccarty@redhat.com>
This commit is contained in:
parent
cf836c35a6
commit
3f1e2c7c13
2 changed files with 5 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
# Run tests
|
THINPOOLDEV=$(ps -ef | grep docker | awk '/--storage-opt/ { for (x=1;x<=NF;x++) if ($x~"--storage-opt") print $(x+1) }' | grep thinpooldev | awk -F= '{print $2}')
|
||||||
THINPOOLDEV=`ps -ef | grep docker | awk '/--storage-opt/ { for (x=1;x<=NF;x++) if ($x~"--storage-opt") print $(x+1) }' | grep thinpooldev | awk -F\= '{print $2}'`
|
ROOTVOLUME=$(df -P | grep " \/$" | awk '{print $1}')
|
||||||
ROOTVOLUME=`df -P | grep " \/$" | awk '{print $1}'`
|
SEPARATEPARTITION=$(grep /var/lib/docker /etc/fstab)
|
||||||
SEPARATEPARTITION=`grep /var/lib/docker /etc/fstab`
|
|
||||||
|
|
||||||
# Verify that somebody didn't put a dummy entry in /etc/fstab and are really
|
# Verify that somebody didn't put a dummy entry in /etc/fstab and are really
|
||||||
# using devicemapper
|
# using devicemapper
|
||||||
|
|
|
@ -5,7 +5,7 @@ info "1 - Host Configuration"
|
||||||
|
|
||||||
# 1.1
|
# 1.1
|
||||||
check_1_1="1.1 - Create a separate partition for containers"
|
check_1_1="1.1 - Create a separate partition for containers"
|
||||||
sh 1_1_check.sh 2>&1
|
source tests/1_1_check.sh 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
pass "$check_1_1"
|
pass "$check_1_1"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue