From 0c61ddb6dd396efc27c2a644bfa73b3d1439419a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 17 Jun 2015 23:52:53 +0200 Subject: [PATCH] from ls to stat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- tests/3_docker_daemon_configuration_files.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/3_docker_daemon_configuration_files.sh b/tests/3_docker_daemon_configuration_files.sh index 33db6bc..67c870a 100644 --- a/tests/3_docker_daemon_configuration_files.sh +++ b/tests/3_docker_daemon_configuration_files.sh @@ -232,10 +232,9 @@ fi check_3_16="3.16 - Verify that /etc/docker directory permissions are set to 755" directory="/etc/docker" if [ -d "$directory" ]; then - perms=$(ls -ld $directory | awk '{print $1}') - if [ "$perms" = "drwxr-xr-x." ]; then + if [ "$(stat -c %a $directory)" -eq 755 ]; then pass "$check_3_16" - elif [ "$perms" = "drwx------" ]; then + elif [ "$(stat -c %a $directory)" -eq 700 ]; then pass "$check_3_16" else warn "$check_3_16"