]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 00:28:28 +0000 (01:28 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 5 Jan 2011 00:28:28 +0000 (01:28 +0100)
only when needed.

ChangeLog
util/grub-install.in

index 0932ee7cb17451118c778f5c962c88596a995237..50da0e678f0a5f582e370096ca1c754ce3829718 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-05  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr
+       only when needed.
+
 2011-01-05  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/term/terminfo.c (grub_terminfo_readkey): Handle keys with
index 716582dfd0afa176286d36bccbe0c706f227825f..90360c279853785b9c7ebc4ae01ccf9268c92cce 100644 (file)
@@ -56,9 +56,6 @@ debug_image=
 
 update_nvram=yes
 
-ofpathname="`which ofpathname`"
-nvsetenv="`which nvsetenv`"
-efibootmgr="`which efibootmgr 2>/dev/null || true`"
 removable=no
 efi_quiet=
 
@@ -585,6 +582,8 @@ if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}"
        --device-map="${device_map}" "${install_device}" || exit 1
 elif [ "${target_cpu}-${platform}" = "i386-ieee1275" ] || [ "${target_cpu}-${platform}" = "powerpc-ieee1275" ]; then
     if [ x"$update_nvram" = xyes ]; then
+       ofpathname="`which ofpathname`"
+       nvsetenv="`which nvsetenv`"
        set "$ofpathname" dummy
        if test -f "$1"; then
            :
@@ -621,6 +620,7 @@ elif [ x"$platform" = xefi ]; then
     cp "${grubdir}/core.${imgext}" "${efidir}/${efi_file}"
 
     # 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
         # On Linux, we need the efivars kernel modules.