From f9252961269246b8504f426b93d19a644d5f9d21 Mon Sep 17 00:00:00 2001 From: zhurong Date: Tue, 7 Mar 2017 21:58:44 +0800 Subject: [PATCH] Fix sudo cat Permission denied error Last commit [0], using sudo cat, this will gievs the error: /etc/systemd/system/docker.service.d/docker.conf: Permission denied This patch will fix this. [0]: I2154919c394e546edac56934c8860d4177fc9603 Change-Id: I87a8b7397d2dad2d26eac9a020d5ea3b21645aa2 --- devstack/lib/zun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devstack/lib/zun b/devstack/lib/zun index b42e191da..f86cd9a2e 100644 --- a/devstack/lib/zun +++ b/devstack/lib/zun @@ -142,11 +142,11 @@ function install_docker { sudo sed -i '/^ExecStart=/cExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:'$(echo $DOCKER_REMOTE_API_PORT)'' /lib/systemd/system/docker.service else sudo mkdir -p /etc/systemd/system/docker.service.d - sudo cat > /etc/systemd/system/docker.service.d/docker.conf << EOF + sudo sh -c "cat > /etc/systemd/system/docker.service.d/docker.conf << EOF [Service] ExecStart= ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:$DOCKER_REMOTE_API_PORT -EOF +EOF" fi sudo systemctl daemon-reload sudo systemctl restart docker