From 33029bf14bc04e30f59f43b42622c051f7fc7e59 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 9 May 2012 05:45:41 +0200 Subject: [PATCH] Fix a few issues with the grub hook This patch: - updates the comments (no need for explicit EXTRA_PKGS) - export the proxy if the instance-debootstrap environment defines it - sets the debconf frontend to non-interactive (I've seen it go into a loop otherwise) I still can't create a grub install, because grub-probe doesn't want to use LVM names nicely, but that's another issue. Signed-off-by: Iustin Pop Reviewed-by: Michael Hanselmann --- examples/hooks/grub | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/hooks/grub b/examples/hooks/grub index c93dcf5..43ec160 100755 --- a/examples/hooks/grub +++ b/examples/hooks/grub @@ -1,17 +1,11 @@ #!/bin/bash # # This is an example script that install and configure grub after installation. -# To use it put it in your CUSTOMIZE_DIR, make it executable, and edit EXTRAPKGS -# of your $sysconfdir/default/ganeti-instance-debootstrap. +# To use it put it in your CUSTOMIZE_DIR and make it executable. # -# Xen, for etch/lenny i386: -# EXTRA_PKGS="linux-image-xen-686,libc6-xen" -# Xen, for etch/lenny amd64: -# EXTRA_PKGS="linux-image-xen-amd64" -# KVM: -# no extra packages needed besides the normal suggested ones -# -# Do not include grub in EXTRA_PKGS because it will cause error of debootstrap. +# Do not include grub in EXTRA_PKGS of +# $sysconfdir/default/ganeti-instance-debootstrap because it will +# cause error of debootstrap. set -e @@ -27,7 +21,11 @@ if [ -z "$TARGET" -o ! -d "$TARGET" ]; then fi # install grub -LANG=C +export LANG=C +if [ "$PROXY" ]; then + export http_proxy="$PROXY" +fi +export DEBIAN_FRONTEND=noninteractive chroot "$TARGET" apt-get -y --force-yes install grub grub-common # make /dev/sda -- 1.7.2.5