From 4c3e4f37be31b5b1ed9e1928116f0d504faac937 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 5 Jan 2011 01:28:28 +0100 Subject: [PATCH] * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr only when needed. --- ChangeLog | 5 +++++ util/grub-install.in | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0932ee7cb..50da0e678 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-01-05 Vladimir Serbinenko + + * util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr + only when needed. + 2011-01-05 Vladimir Serbinenko * grub-core/term/terminfo.c (grub_terminfo_readkey): Handle keys with diff --git a/util/grub-install.in b/util/grub-install.in index 716582dfd..90360c279 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -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. -- 2.39.2