From acd7307b957e69c417474f0a84c8e894f5a8ad28 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 20 Jun 2012 10:08:39 +0200 Subject: [PATCH] Fix ssh key labelling --- .../hooks/10-dsa-install-extra-packages.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 f87d165e..0b0b866c 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 -- 2.39.2