* util/grub-install.in: Determine ofpathname, nvsetenv and efibootmgr

only when needed.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-01-05 01:28:28 +01:00
parent 488f71f116
commit 4c3e4f37be
2 changed files with 8 additions and 3 deletions

View file

@ -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

View 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.