1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
install_ssh_host_keys() {
if [ ! -r ${OARCONFDIR}/oar_ssh_host_rsa_key ]; then
rm -f ${OARCONFDIR}/oar_ssh_host_rsa_key.pub
if [ -e "${ETCDIR}/ssh/ssh_host_rsa_key" ]; then
install_if_not_exist \
${ETCDIR}/ssh/ssh_host_rsa_key \
${OARCONFDIR}/oar_ssh_host_rsa_key \
0600
install_if_not_exist \
${ETCDIR}/ssh/ssh_host_rsa_key.pub \
${OARCONFDIR}/oar_ssh_host_rsa_key.pub
fi
fi
if [ ! -r ${OARCONFDIR}/oar_ssh_host_dsa_key ]; then
rm -f ${OARCONFDIR}/oar_ssh_host_dsa_key.pub
if [ -e "${ETCDIR}/ssh/ssh_host_dsa_key" ]; then
install_if_not_exist \
${ETCDIR}/ssh/ssh_host_dsa_key \
${OARCONFDIR}/oar_ssh_host_dsa_key \
0600
install_if_not_exist \
${ETCDIR}/ssh/ssh_host_dsa_key.pub \
${OARCONFDIR}/oar_ssh_host_dsa_key.pub
fi
fi
if [ ! "-d ${VARLIBDIR}/oar/.ssh/id_rsa" ] && [ ! "-d ${VARLIBDIR}/oar/.ssh/id_dsa" ]; then
echo "
##########################################################################
# node #
########
# You need to install the ssh keys (private and public) of the oar user
# into ${VARLIBDIR}/oar/.ssh.
# A common way is to copy the entire .ssh directory from the server on
# all the nodes of your cluster.
##########################################################################
"
fi
}
node_setup() {
install_conffile \
${SHAREDIR}/epilogue \
${OARCONFDIR}/epilogue \
0755
install_conffile \
${SHAREDIR}/prologue \
${OARCONFDIR}/prologue \
0755
install_conffile \
${SHAREDIR}/sshd_config \
${OARCONFDIR}/sshd_config \
0600 ${OAROWNER}
install_ssh_host_keys
}
|