Fix syntax error in generated grub-xen.postinst.

This commit is contained in:
Colin Watson 2013-12-04 15:33:04 +00:00
parent 0bdbd5599b
commit ebc4615808
2 changed files with 4 additions and 2 deletions

View File

@ -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; my @cpu_platforms = grep { !/^\./ } readdir $grub_dir;
closedir $grub_dir; closedir $grub_dir;
$subst{FIRST_CPU_PLATFORM} = $cpu_platforms[0];
sub emit ($) { sub emit ($) {
my $line = shift; my $line = shift;
while (my ($key, $value) = each %subst) { while (my ($key, $value) = each %subst) {

4
debian/postinst.in vendored
View File

@ -325,7 +325,7 @@ case "$1" in
mkdir -p /boot/grub mkdir -p /boot/grub
if test -e /boot/grub/device.map && ! test -e /boot/grub/core.img && \ 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 # Looks like your device.map was generated by GRUB Legacy, which
# used to generate broken device.map (see #422851). Avoid the risk # used to generate broken device.map (see #422851). Avoid the risk
# by regenerating it. # by regenerating it.
@ -460,7 +460,7 @@ case "$1" in
# Skip grub-install in containers. # Skip grub-install in containers.
: :
elif test -z "$2" || test -e /boot/grub/core.img || \ 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 test "$UPGRADE_FROM_GRUB_LEGACY" || test "$wubi_device"; then
question=grub-pc/install_devices question=grub-pc/install_devices
device_map="$(grub-mkdevicemap -m - | grep -v '^(fd[0-9]\+)' || true)" device_map="$(grub-mkdevicemap -m - | grep -v '^(fd[0-9]\+)' || true)"