X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Ftemplates%2Finstance-debootstrap%2Fhooks%2F10-dsa-install-extra-packages.erb;h=0b0b866c53050b05627a2a7998fa33c38835ba36;hb=520723a247561ab5bae018dc5e8db58c06195a3b;hp=f87d165eb22914fd3fd8b797e0b803d5fefa2b9f;hpb=14235e6b690b63b523ee5df04a3df0e0f53ef7d2;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb index f87d165eb..0b0b866c5 100755 --- a/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb +++ b/modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb @@ -10,8 +10,9 @@ fi chroot "$TARGET" apt-get -qq update chroot "$TARGET" apt-get -qq install vim ssh extlinux -hostname="$(hostname)" -sed -e "s#root@$hostname#root@$instance#" -i /etc/ssh/ssh*pub +node="$(hostname)" +instance="$(cat $TARGET/etc/hostname)" +sed -e "s#root@$node#root@$instance#" -i "$TARGET"/etc/ssh/ssh*pub if [ "$ARCH" = "amd64" ]; then chroot "$TARGET" apt-get -qq install linux-image-amd64