|
|
|
@ -2029,12 +2029,10 @@ vagrant_configuration() {
|
|
|
|
|
die "Error: failed to install 'bzip2 less ${linux_headers_package} make sudo' packages."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
ngcp_vmbuilder='/tmp/ngcp-vmbuilder/'
|
|
|
|
|
if [ -d "${ngcp_vmbuilder}" ] ; then
|
|
|
|
|
echo "Checkout of ngcp-vmbuilder exists already, nothing to do"
|
|
|
|
|
else
|
|
|
|
|
echo "Checking out ngcp-vmbuilder git repository"
|
|
|
|
|
git clone git://git.mgm.sipwise.com/vmbuilder "${ngcp_vmbuilder}"
|
|
|
|
|
vagrant_ssh_pub_key='/var/tmp/id_rsa_sipwise.pub'
|
|
|
|
|
echo "Checking out ngcp-vmbuilder git repository"
|
|
|
|
|
if ! wget -O "${vagrant_ssh_pub_key}" http://builder.mgm.sipwise.com/vagrant-ngcp/id_rsa_sipwise.pub ; then
|
|
|
|
|
die "Error: failed to wget public Sipwise SSH key for Vagrant boxes"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if "$NGCP_INSTALLER" ; then
|
|
|
|
@ -2049,14 +2047,14 @@ vagrant_configuration() {
|
|
|
|
|
|
|
|
|
|
echo "Adjusting ssh configuration for user sipwise (add Vagrant SSH key)"
|
|
|
|
|
mkdir -p "${TARGET}/${SIPWISE_HOME}/.ssh/"
|
|
|
|
|
cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/${SIPWISE_HOME}/.ssh/sipwise_vagrant_key"
|
|
|
|
|
cat "${vagrant_ssh_pub_key}" >> "${TARGET}/${SIPWISE_HOME}/.ssh/sipwise_vagrant_key"
|
|
|
|
|
chroot "${TARGET}" chown sipwise:sipwise "${SIPWISE_HOME}/.ssh" "${SIPWISE_HOME}/.ssh/sipwise_vagrant_key"
|
|
|
|
|
chroot "${TARGET}" chmod 0600 "${SIPWISE_HOME}/.ssh/sipwise_vagrant_key"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Adjusting ssh configuration for user root"
|
|
|
|
|
mkdir -p "${TARGET}/root/.ssh/"
|
|
|
|
|
cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/root/.ssh/sipwise_vagrant_key"
|
|
|
|
|
cat "${vagrant_ssh_pub_key}" >> "${TARGET}/root/.ssh/sipwise_vagrant_key"
|
|
|
|
|
chroot "${TARGET}" chmod 0600 /root/.ssh/sipwise_vagrant_key
|
|
|
|
|
case "${DEBIAN_RELEASE}" in
|
|
|
|
|
squeeze)
|
|
|
|
|