Skip to content
Snippets Groups Projects
Commit 1382e39f authored by Éric Lemoine's avatar Éric Lemoine
Browse files

Remove duplicate code in cinder extend_start.sh

Change-Id: I71953c905b978176bf7dc6bcaf3c4766be4b60fb
Partial-Bug: #1546944
parent 3f8bc072
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,8 @@ RUN apt-get install -y --no-install-recommends \ ...@@ -16,8 +16,8 @@ RUN apt-get install -y --no-install-recommends \
{% endif %} {% endif %}
{% endif %} {% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_cinder_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_cinder_extend_start
{{ include_footer }} {{ include_footer }}
......
#!/bin/bash #!/bin/bash
set -o errexit set -o errexit
if [[ ! -d "/var/log/kolla/cinder" ]]; then
mkdir -p /var/log/kolla/cinder
fi
if [[ $(stat -c %a /var/log/kolla/cinder) != "755" ]]; then
chmod 755 /var/log/kolla/cinder
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty. # of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
......
...@@ -58,4 +58,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start ...@@ -58,4 +58,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla cinder \ RUN usermod -a -G kolla cinder \
&& chmod 750 /etc/sudoers.d \ && chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/cinder_sudoers \ && chmod 440 /etc/sudoers.d/cinder_sudoers \
&& chmod 755 /usr/local/bin/kolla_extend_start && touch /usr/local/bin/kolla_cinder_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cinder_extend_start
...@@ -6,3 +6,5 @@ fi ...@@ -6,3 +6,5 @@ fi
if [[ $(stat -c %a /var/log/kolla/cinder) != "755" ]]; then if [[ $(stat -c %a /var/log/kolla/cinder) != "755" ]]; then
chmod 755 /var/log/kolla/cinder chmod 755 /var/log/kolla/cinder
fi fi
source /usr/local/bin/kolla_cinder_extend_start
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment