From ebc4615808fa2aed925548a6069bc051c6056db7 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 4 Dec 2013 15:33:04 +0000 Subject: [PATCH] Fix syntax error in generated grub-xen.postinst. --- debian/platform-subst | 2 ++ debian/postinst.in | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/platform-subst b/debian/platform-subst index 8f10c74a6..436ffca52 100755 --- a/debian/platform-subst +++ b/debian/platform-subst @@ -16,6 +16,8 @@ opendir my $grub_dir, $grub_dir_path or die "can't opendir $grub_dir_path: $!"; my @cpu_platforms = grep { !/^\./ } readdir $grub_dir; closedir $grub_dir; +$subst{FIRST_CPU_PLATFORM} = $cpu_platforms[0]; + sub emit ($) { my $line = shift; while (my ($key, $value) = each %subst) { diff --git a/debian/postinst.in b/debian/postinst.in index 64be386f8..1298f246c 100644 --- a/debian/postinst.in +++ b/debian/postinst.in @@ -325,7 +325,7 @@ case "$1" in mkdir -p /boot/grub if test -e /boot/grub/device.map && ! test -e /boot/grub/core.img && \ - ! test -e /boot/grub/@CPU_PLATFORM@/core.img; then + ! test -e /boot/grub/@FIRST_CPU_PLATFORM@/core.img; then # Looks like your device.map was generated by GRUB Legacy, which # used to generate broken device.map (see #422851). Avoid the risk # by regenerating it. @@ -460,7 +460,7 @@ case "$1" in # Skip grub-install in containers. : elif test -z "$2" || test -e /boot/grub/core.img || \ - test -e /boot/grub/@CPU_PLATFORM@/core.img || \ + test -e /boot/grub/@FIRST_CPU_PLATFORM@/core.img || \ test "$UPGRADE_FROM_GRUB_LEGACY" || test "$wubi_device"; then question=grub-pc/install_devices device_map="$(grub-mkdevicemap -m - | grep -v '^(fd[0-9]\+)' || true)"