Have docker start script honor configuration
authorMartin André <m.andre@redhat.com>
Tue, 6 Sep 2016 13:37:00 +0000 (15:37 +0200)
committerMartin André <m.andre@redhat.com>
Wed, 19 Oct 2016 12:31:17 +0000 (14:31 +0200)
The test was always evaluate as true which resulted in
insecure_registry line being set even when DockerNamespaceIsRegistry
was set to false.

Change-Id: Iacb73a4908a6a27082b94fe919734e644ed47b19

docker/firstboot/start_docker_agents.sh

index 6862503..2431ef0 100644 (file)
@@ -18,7 +18,9 @@ echo "127.0.0.1 $HOSTNAME.localdomain $HOSTNAME" >> /etc/hosts
 #echo "ADD_REGISTRY='--registry-mirror $docker_registry'" >> /etc/sysconfig/docker
 
 # Local docker registry 1.8
-if [ $docker_namespace_is_registry ]; then
+# NOTE(mandre) $docker_namespace_is_registry is not a bash variable but is
+# a place holder for text replacement done via heat
+if [ "$docker_namespace_is_registry" = True ]; then
     /usr/bin/systemctl stop docker.service
     # if namespace is used with local registry, trim all namespacing
     trim_var=$docker_registry