From 34ac0dfad21b02d7b94f3239a420e998c04f8ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 24 Feb 2016 12:10:22 +0100 Subject: [PATCH] Remove duplicate code in murano extend_start.sh Change-Id: I32e55ce520c95b3d2c018604e925bd8d4fdf58f1 Partial-Bug: #1546944 --- docker/murano/murano-api/Dockerfile.j2 | 4 ++-- docker/murano/murano-api/extend_start.sh | 7 ------- docker/murano/murano-base/Dockerfile.j2 | 3 ++- docker/murano/murano-base/extend_start.sh | 2 ++ 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docker/murano/murano-api/Dockerfile.j2 b/docker/murano/murano-api/Dockerfile.j2 index 7d57d9c7fd..76b23f9390 100644 --- a/docker/murano/murano-api/Dockerfile.j2 +++ b/docker/murano/murano-api/Dockerfile.j2 @@ -11,8 +11,8 @@ RUN apt-get install -y --no-install-recommends \ {% endif %} {% endif %} -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start +COPY extend_start.sh /usr/local/bin/kolla_murano_extend_start +RUN chmod 755 /usr/local/bin/kolla_murano_extend_start {{ include_footer }} diff --git a/docker/murano/murano-api/extend_start.sh b/docker/murano/murano-api/extend_start.sh index a00a46503d..d46b2b0afb 100644 --- a/docker/murano/murano-api/extend_start.sh +++ b/docker/murano/murano-api/extend_start.sh @@ -1,12 +1,5 @@ #!/bin/bash -if [[ ! -d "/var/log/kolla/murano" ]]; then - mkdir -p /var/log/kolla/murano -fi -if [[ $(stat -c %a /var/log/kolla/murano) != "755" ]]; then - chmod 755 /var/log/kolla/murano -fi - # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # of the KOLLA_BOOTSTRAP variable being set, including empty. if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then diff --git a/docker/murano/murano-base/Dockerfile.j2 b/docker/murano/murano-base/Dockerfile.j2 index 49e372581b..26fc7618ea 100644 --- a/docker/murano/murano-base/Dockerfile.j2 +++ b/docker/murano/murano-base/Dockerfile.j2 @@ -29,4 +29,5 @@ RUN ln -s murano-base-source/* murano \ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN usermod -a -G kolla murano \ - && chmod 755 /usr/local/bin/kolla_extend_start + && touch /usr/local/bin/kolla_murano_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_murano_extend_start diff --git a/docker/murano/murano-base/extend_start.sh b/docker/murano/murano-base/extend_start.sh index 1f94551d7f..66dde46ed4 100644 --- a/docker/murano/murano-base/extend_start.sh +++ b/docker/murano/murano-base/extend_start.sh @@ -6,3 +6,5 @@ fi if [[ $(stat -c %a /var/log/kolla/murano) != "755" ]]; then chmod 755 /var/log/kolla/murano fi + +source /usr/local/bin/kolla_murano_extend_start