]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ganeti2/templates/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb
Fix ssh public key labels
[dsa-puppet.git] / modules / ganeti2 / templates / instance-debootstrap / hooks / 10-dsa-install-extra-packages.erb
1 #!/bin/bash
2
3 set -e
4
5 if [ -z "$TARGET" -o ! -d "$TARGET" ]; then
6   echo "Missing target directory"
7   exit 1
8 fi
9
10 chroot "$TARGET" apt-get -qq update
11 chroot "$TARGET" apt-get -qq install vim ssh extlinux
12
13 hostname="$(hostname)"
14 set -e "s#root@$hostname#root@$instance#" -i /etc/ssh/ssh*pub
15
16 if [ "$ARCH" = "amd64" ]; then
17     chroot "$TARGET" apt-get -qq install linux-image-amd64
18 fi
19
20 exit 0