From ff314754a3893770e56e49141794b33aa8a188bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Wed, 22 Feb 2017 09:37:42 +0100 Subject: [PATCH] null if no config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- helper_lib.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/helper_lib.sh b/helper_lib.sh index 15934eb..d7a4618 100644 --- a/helper_lib.sh +++ b/helper_lib.sh @@ -87,12 +87,10 @@ get_docker_configuration_file_args() { if [ -f "$FILE" ]; then CONFIG_FILE="$FILE" + elif [ -f '/etc/docker/daemon.json' ]; then + CONFIG_FILE='/etc/docker/daemon.json' else - CONFIG_FILE="/etc/docker/daemon.json" - fi - - if ! grep "$OPTION" "$CONFIG_FILE"; then - echo 0 + CONFIG_FILE='/dev/null' fi }