aa1d4d2246
Significant changes: * Using docker image to install datastore. * Datastore image is common to different datastores. * Using backup docker image to do backup and restore. * Support MariaDB replication * Set most of the functional jobs as non-voting as nested virtualization is not supported in CI. Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
23 lines
723 B
Bash
Executable File
23 lines
723 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
GUEST_SSH_DIR="/home/${GUEST_USERNAME}/.ssh"
|
|
TMP_HOOKS_DIR="/tmp/in_target.d"
|
|
|
|
if [ ! -e ${GUEST_SSH_DIR} ]; then
|
|
# this method worked more reliable in vmware fusion over doing sudo -Hiu ${GUEST_USERNAME}
|
|
mkdir ${GUEST_SSH_DIR}
|
|
chown -R ${GUEST_USERNAME}:${GUEST_USERNAME} ${GUEST_SSH_DIR}
|
|
fi
|
|
|
|
if [[ ${DEV_MODE} == "true" && -e "${TMP_HOOKS_DIR}/id_rsa" ]]; then
|
|
sudo -Hiu ${GUEST_USERNAME} dd of=${GUEST_SSH_DIR}/id_rsa.pub if=${TMP_HOOKS_DIR}/id_rsa.pub
|
|
sudo -Hiu ${GUEST_USERNAME} dd of=${GUEST_SSH_DIR}/id_rsa if=${TMP_HOOKS_DIR}/id_rsa
|
|
sudo -Hiu ${GUEST_USERNAME} chmod 600 ${GUEST_SSH_DIR}/id_rsa
|
|
fi
|