e6571c0203
This prevents failure when the directory already exists. This commit fixes a failure in centos-binary because of a change in the RDO packaging, where the required directory is now created for us. Change-Id: Idd3e15802c3e3fd363e1295111ec12948d566781 Closes-Bug: #1543417
14 lines
477 B
Bash
14 lines
477 B
Bash
#!/bin/bash
|
|
|
|
# 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
|
|
sudo chown nova: /var/lib/nova/
|
|
mkdir -p /var/lib/nova/instances
|
|
# Only update permissions if permissions need to be updated
|
|
if [[ $(stat -c %U:%G /var/lib/nova/instances) != "nova:nova" ]]; then
|
|
sudo chown nova: /var/lib/nova/instances
|
|
fi
|
|
exit 0
|
|
fi
|