MT#16489 Fix plain squeeze plain vagrant VM

AuthorizedKeysFile supports one file only in Debian squeeze.

Change-Id: I0c4d5068860fa031c22d3b79935a6f9e3519e19f
changes/93/3493/1
Alexander Lutay 10 years ago
parent 034b6d3012
commit 828b767a1e

@ -2036,7 +2036,14 @@ vagrant_configuration() {
mkdir -p "${TARGET}/root/.ssh/"
cat "${ngcp_vmbuilder}/config/id_rsa_sipwise.pub" >> "${TARGET}/root/.ssh/sipwise_vagrant_key"
chroot "${TARGET}" chmod 0600 /root/.ssh/sipwise_vagrant_key
sed -i 's|^[#\s]*\(AuthorizedKeysFile.*\)$|\1 %h/.ssh/sipwise_vagrant_key|g' "${TARGET}/etc/ssh/sshd_config"
case "${DEBIAN_RELEASE}" in
squeeze)
sed -i 's|^[#\s]*AuthorizedKeysFile.*$|AuthorizedKeysFile %h/.ssh/sipwise_vagrant_key|g' "${TARGET}/etc/ssh/sshd_config"
;;
*)
sed -i 's|^[#\s]*\(AuthorizedKeysFile.*\)$|\1 %h/.ssh/sipwise_vagrant_key|g' "${TARGET}/etc/ssh/sshd_config"
;;
esac
# see https://github.com/mitchellh/vagrant/issues/1673
# and https://bugs.launchpad.net/ubuntu/+source/xen-3.1/+bug/1167281

Loading…
Cancel
Save