]> git.proxmox.com Git - grub2.git/commitdiff
* util/grub-install.in: Handle efibootmgr presence check.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 10 May 2013 14:58:25 +0000 (16:58 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 10 May 2013 14:58:25 +0000 (16:58 +0200)
Reported by: Leif Lindholm.

ChangeLog
util/grub-install.in

index f5d8fd7a31fbb3f93234efd97584f1d0a3f9def7..fdfa56b80035c254207244d2677571a3abce9fa7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-install.in: Handle efibootmgr presence check.
+       Reported by: Leif Lindholm.
+
 2013-05-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/commands/testspeed.c: Reuse formatting string to decrease
index 3dbd5da736d42de328d4663bf8b84ddc94e84a6d..9fb0ee69b6ee8b0a37b172840ce366d1af96c1df 100644 (file)
@@ -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*)