~ubuntu-branches/ubuntu/wily/grub2/wily-proposed

« back to all changes in this revision

Viewing changes to debian/postinst.in

  • Committer: Package Import Robot
  • Author(s): Ian Campbell, Colin Watson, Ian Campbell
  • Date: 2014-11-30 17:15:21 UTC
  • Revision ID: package-import@ubuntu.com-20141130171521-jtqle9j0ckcww9wy
Tags: 2.02~beta2-17
[ Colin Watson ]
* Fix up some pointer-to-integer casts in linuxefi so that it can build on
  i386-efi.
* Backport from upstream:
  - Fix typo (gettext_print instead of gettext_printf) (LP: #1390766).

[ Ian Campbell ]
* Correct syntax error in grub-xen-host bootstrap configuration file.
* Log failure when grub-install fails in postinst, rather than failing the
  entire postinst. (Closes: #770412)
* Arrange to insmod xzio and lzopio when booting a kernel as a Xen guest.
  (Closes: #755256)

Show diffs side-by-side

added added

removed removed

Lines of Context:
299
299
  type running-in-container >/dev/null 2>&1 && running-in-container >/dev/null
300
300
}
301
301
 
 
302
run_grub_install()
 
303
{
 
304
    if ! grub-install $@ ; then
 
305
        echo "Failed: grub-install $@" >&2
 
306
        echo "WARNING: Bootloader is not properly installed, system may not be bootable" >&2
 
307
    fi
 
308
}
 
309
 
302
310
case "$1" in
303
311
  configure)
304
312
    . /usr/share/debconf/confmodule
696
704
            grub-efi-arm)   target=arm-efi ;;
697
705
            grub-efi-arm64) target=arm64-efi ;;
698
706
          esac
699
 
          grub-install --target="$target"
 
707
          run_grub_install --target="$target"
700
708
        fi
701
709
 
702
710
        # /boot/grub/ has more chances of being accessible by GRUB
714
722
            # Output may be empty; if so, just update the core image but
715
723
            # don't install it to any PReP partition.
716
724
            prep_bootdev="$(/usr/lib/grub/powerpc-ieee1275/prep-bootdev)"
717
 
            grub-install --target=powerpc-ieee1275 $prep_bootdev
 
725
            run_grub_install --target=powerpc-ieee1275 $prep_bootdev
718
726
          ;;
719
727
        esac
720
728
      ;;
721
729
 
722
730
      grub-yeeloong)
723
 
        grub-install --target=mipsel-loongson
 
731
        run_grub_install --target=mipsel-loongson
724
732
      ;;
725
733
 
726
734
      grub-xen)
727
735
        # Install for x86_64 regardless of arch, since a 32-bit userspace can still boot with a 64-bit kernel.
728
 
        mkdir -p /boot/xen
729
 
        grub-install --target=x86_64-xen
 
736
        mkdir -p /boot/xen
 
737
        run_grub_install --target=x86_64-xen
730
738
        case $(dpkg --print-architecture) in
731
739
          i386)
732
 
            grub-install --target=i386-xen
 
740
            run_grub_install --target=i386-xen
733
741
          ;;
734
742
        esac
735
743
      ;;