From eef498acb88df513c95c14dbca3472d213790ef5 Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Sat, 8 Apr 2017 15:25:23 +0100 Subject: [PATCH 1/3] fanatic: Prevent error message without docker installed After adding support for the new docker network config there is an error message because calling the docker command in order to figure out the version of it is not very successful without the docker command installed. Fix this by testing for the docker command and fail silently without it being installed. Signed-off-by: Stefan Bader --- fanatic | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fanatic b/fanatic index 7600b61..88f9403 100755 --- a/fanatic +++ b/fanatic @@ -290,6 +290,9 @@ twiddle_docker_config_1_12() twiddle_docker_config() { + # Always fail this if docker is not installed + type docker >/dev/null 2>&1 || return 1 + local dver=$(docker -v | awk '{sub(/,/, "", $3); print $3}') if dpkg --compare-versions "$dver" lt 1.12; then -- 2.7.4