]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
Better check for grub-legacy availability which ignores virtual packages
authorAxel Beckert <abe@deuxchevaux.org>
Thu, 24 Jan 2013 19:02:22 +0000 (20:02 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Thu, 24 Jan 2013 22:14:34 +0000 (23:14 +0100)
hooks/common/82-install-grub-legacy

index 8beb5ab05e29e4512e14fd1903663526cb25a1eb..e78d1d9fb7fa251dfbbef0586e913fbb3d91ef3a 100755 (executable)
@@ -31,7 +31,7 @@ if [ ${pygrub} ]; then
 #
 #  Install the grub 0.9x package ("grub-legacy" on Debian, "grub" on Ubuntu)
 #
-if chroot ${prefix} /usr/bin/apt-cache show grub-legacy >/dev/null 2>/dev/null; then
+if chroot ${prefix} /usr/bin/apt-cache show grub-legacy 2>/dev/null | egrep -qi 'GRand Unified Bootloader.*Legacy'; then
     installDebianPackage ${prefix} grub-legacy
 else
     installDebianPackage ${prefix} grub