Remove duplicate code in glance extend_start.sh

Change-Id: I34f63aef2a473c475f3740e160f64e6c1ee758fc
Partial-Bug: #1546944
This commit is contained in:
Éric Lemoine 2016-02-24 11:41:23 +01:00
parent 3f8bc07270
commit 63e2c64081
4 changed files with 6 additions and 10 deletions

View File

@ -1,8 +1,8 @@
FROM {{ namespace }}/{{ image_prefix }}glance-base:{{ tag }}
MAINTAINER {{ maintainer }}
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_glance_extend_start
RUN chmod 755 /usr/local/bin/kolla_glance_extend_start
{{ include_footer }}

View File

@ -1,12 +1,5 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/glance" ]]; then
mkdir -p /var/log/kolla/glance
fi
if [[ $(stat -c %a /var/log/kolla/glance) != "755" ]]; then
chmod 755 /var/log/kolla/glance
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

View File

@ -56,4 +56,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla glance \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/glance_sudoers \
&& chmod 755 /usr/local/bin/kolla_extend_start
&& touch /usr/local/bin/kolla_glance_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_glance_extend_start

View File

@ -6,3 +6,5 @@ fi
if [[ $(stat -c %a /var/log/kolla/glance) != "755" ]]; then
chmod 755 /var/log/kolla/glance
fi
source /usr/local/bin/kolla_glance_extend_start