From 9111a66ef5c4e8f9afe92c7290ecc93d240d1fe2 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 29 Jul 2016 14:04:43 +0100 Subject: [PATCH] Use the name of the first unix socket in DOCKER_OPTS Otherwise the while loop waits forever, checking for a filename made up of all the names. Signed-off-by: Bryan Boreham Upstream-commit: 68dab9bd0910e22c96d5dfcbd4e972f8ce770a88 Component: engine --- components/engine/contrib/init/upstart/docker.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/contrib/init/upstart/docker.conf b/components/engine/contrib/init/upstart/docker.conf index 29a66de476..d58f7d6ac8 100644 --- a/components/engine/contrib/init/upstart/docker.conf +++ b/components/engine/contrib/init/upstart/docker.conf @@ -58,7 +58,7 @@ post-start script if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then DOCKER_SOCKET=/var/run/docker.sock else - DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)') + DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q) fi if [ -n "$DOCKER_SOCKET" ]; then