2 # Add ssh keys from a Ganeti Web Manager instance to a VM
8 if [ -z "${TARGET}" -o ! -d "${TARGET}" ] ; then
9 echo "Missing target directory"
13 if [ -z "${GWM_SSHKEYS}" -o ! -x "${GWM_SSHKEYS}" ] ; then
14 echo "Missing Ganeti Web Manager sshkeys.py"
18 if [ -z "${GWM_HOST}" ] ; then
23 if [ -z "${GWM_SLUG}" ] ; then
28 if [ -z "${GWM_API_KEY}" ] ; then
29 echo "GWM_API_KEY empty"
33 mkdir
-p ${TARGET}/root
/.
ssh
34 ${GWM_SSHKEYS} ${GWM_API_KEY} ${GWM_HOST} ${GWM_SLUG} \
35 ${INSTANCE_NAME} > ${TARGET}/root
/.ssh
/authorized_keys