From 30b03dc22eeef3507296dbfa62fcfd12c9a3c505 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 10 May 2013 16:58:25 +0200 Subject: [PATCH] * util/grub-install.in: Handle efibootmgr presence check. Reported by: Leif Lindholm. --- ChangeLog | 5 +++++ util/grub-install.in | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5d8fd7a3..fdfa56b80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-05-10 Vladimir Serbinenko + + * util/grub-install.in: Handle efibootmgr presence check. + Reported by: Leif Lindholm. + 2013-05-10 Vladimir Serbinenko * grub-core/commands/testspeed.c: Reuse formatting string to decrease diff --git a/util/grub-install.in b/util/grub-install.in index 3dbd5da73..9fb0ee69b 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -754,9 +754,21 @@ elif [ x"$grub_modinfo_platform" = xefi ]; then fi # Try to make this image bootable using the EFI Boot Manager, if available. - efibootmgr="`which efibootmgr`" - if test "$removable" = no && test -n "$efi_distributor" && \ - test -n "$efibootmgr"; then + if test "$removable" = no; then + + efibootmgr="`which efibootmgr`" || { + # TRANSLATORS: This message is shown when required executable `%s' + # isn't found + gettext_printf "%s: Not found.\n" "efibootmgr" 1>&2 + exit 1 + } + + test -n "$efi_distributor" || { + gettext "EFI distributor id isn't specified." 1>&2 + echo 1>&2 + exit 1 + } + # On Linux, we need the efivars kernel modules. case "$host_os" in linux*)