#!/bin/bash
set -o errexit
set -o xtrace

# Processing /var/lib/kolla/config_files/config.json as root.  This is necessary
# to permit certain files to be controlled by the root user which should
# not be writable by the dropped-privileged user, especially /run_command
sudo -E kolla_set_configs
CMD=$(cat /run_command)
ARGS=""

if [[ ! "${!KOLLA_SKIP_EXTEND_START[@]}" ]]; then
    # Run additional commands if present
    . kolla_extend_start
fi

echo "Running command: '${CMD}${ARGS:+ $ARGS}'"
exec ${CMD} ${ARGS}

#!/bin/bash
set -o errexit
set -o xtrace

# Processing /var/lib/kolla/config_files/config.json as root.  This is necessary
# to permit certain files to be controlled by the root user which should
# not be writable by the dropped-privileged user, especially /run_command
sudo -E kolla_set_configs
CMD=$(cat /run_command)
ARGS=""

if [[ ! "${!KOLLA_SKIP_EXTEND_START[@]}" ]]; then
    # Run additional commands if present
    . kolla_extend_start
fi

echo "Running command: '${CMD}${ARGS:+ $ARGS}'"
umask "${TRIPLEO_KOLLA_UMASK:-0022}"
exec ${CMD} ${ARGS}

Add TRIPLEO_KOLLA_UMASK for custom umask settings
Add TRIPLEO_KOLLA_UMASK for custom umask settings

Allow execution of the kolla_start script with
a given umask settings. Virtqemud container requires this
at the least, as libvirt/qemu dynamic permissions should
be restricted to not create VM files world readable.

Change-Id: Iaa09a8a4cad12d49007ea92ea0922597916981af
Signed-off-by: Bogdan Dobrelya <a2228ae37d00d1cbd5a93e53f3e1e5aef21d5900@redhat.com>
