From: Michael Prokop Date: Thu, 13 Oct 2011 22:16:56 +0000 (+0200) Subject: make sure grub-pc is installed when grub option is used X-Git-Tag: v0.48~2 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=1ba2adf1af0237c2465dab2b2f9a20ed5ee72889 make sure grub-pc is installed when grub option is used --- diff --git a/chroot-script b/chroot-script index 62f24f8..7d2c8c3 100755 --- a/chroot-script +++ b/chroot-script @@ -421,6 +421,11 @@ grub_install() { return 0 fi + if ! dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then + echo "Notice: grub option set but no grub-pc package, installing it therefore." + DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL grub-pc + fi + if ! [ -x "$(which grub-install)" ] ; then echo "Error: grub-install not available. (Error while installing grub package?)" >&2 return 1