2018-03-15 19:05:59 +00:00
|
|
|
From f72c593c32ecba7b10ceb4c63ca8ec48f60c3ccf Mon Sep 17 00:00:00 2001
|
2014-07-02 15:49:28 +00:00
|
|
|
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
|
|
|
Date: Wed, 19 Feb 2014 15:58:43 -0500
|
2018-04-06 20:17:39 +00:00
|
|
|
Subject: [PATCH 112/229] use fw_path prefix when fallback searching for grub
|
2014-07-02 15:49:28 +00:00
|
|
|
config
|
|
|
|
|
|
|
|
When PXE booting via UEFI firmware, grub was searching for grub.cfg
|
|
|
|
in the fw_path directory where the grub application was found. If
|
|
|
|
that didn't exist, a fallback search would look for config file names
|
|
|
|
based on MAC and IP address. However, the search would look in the
|
|
|
|
prefix directory which may not be the same fw_path. This patch
|
|
|
|
changes that behavior to use the fw_path directory for the fallback
|
|
|
|
search. Only if fw_path is NULL will the prefix directory be searched.
|
|
|
|
|
|
|
|
Signed-off-by: Mark Salter <msalter@redhat.com>
|
|
|
|
---
|
|
|
|
grub-core/normal/main.c | 5 +++--
|
|
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
2018-02-27 18:56:41 +00:00
|
|
|
index 0ce59fdc3f0..a3713efcd90 100644
|
2014-07-02 15:49:28 +00:00
|
|
|
--- a/grub-core/normal/main.c
|
|
|
|
+++ b/grub-core/normal/main.c
|
|
|
|
@@ -343,7 +343,7 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
|
|
|
char *config;
|
|
|
|
const char *prefix, *fw_path;
|
|
|
|
|
|
|
|
- fw_path = grub_env_get ("fw_path");
|
|
|
|
+ prefix = fw_path = grub_env_get ("fw_path");
|
|
|
|
if (fw_path)
|
|
|
|
{
|
|
|
|
config = grub_xasprintf ("%s/grub.cfg", fw_path);
|
|
|
|
@@ -366,7 +366,8 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- prefix = grub_env_get ("prefix");
|
|
|
|
+ if (! prefix)
|
|
|
|
+ prefix = grub_env_get ("prefix");
|
|
|
|
if (prefix)
|
|
|
|
{
|
|
|
|
grub_size_t config_len;
|
|
|
|
--
|
2018-02-27 18:56:41 +00:00
|
|
|
2.15.0
|
2014-07-02 15:49:28 +00:00
|
|
|
|