Blame SOURCES/0034-Set-envFile-from-env-when-bootloader-is-not-specifie.patch

56d25d
From 92d813aeec67ee19b7340d3df29347c5b149b8e2 Mon Sep 17 00:00:00 2001
56d25d
From: "Brian C. Lane" <bcl@redhat.com>
56d25d
Date: Mon, 13 Apr 2015 13:57:33 -0700
56d25d
Subject: [PATCH 34/41] Set envFile from --env when bootloader is not specified
56d25d
56d25d
---
56d25d
 grubby.c | 6 ++++--
56d25d
 1 file changed, 4 insertions(+), 2 deletions(-)
56d25d
56d25d
diff --git a/grubby.c b/grubby.c
56d25d
index 5ee20e3..232704a 100644
56d25d
--- a/grubby.c
56d25d
+++ b/grubby.c
56d25d
@@ -4371,9 +4371,11 @@ int main(int argc, const char ** argv) {
56d25d
     }
56d25d
 
56d25d
     if (!cfi) {
56d25d
-        if (grub2FindConfig(&grub2ConfigType))
56d25d
+        if (grub2FindConfig(&grub2ConfigType)) {
56d25d
 	    cfi = &grub2ConfigType;
56d25d
-	else
56d25d
+	    if (envPath)
56d25d
+		cfi->envFile = envPath;
56d25d
+        } else
56d25d
       #ifdef __ia64__
56d25d
 	    cfi = &eliloConfigType;
56d25d
       #elif __powerpc__
56d25d
-- 
56d25d
2.4.3
56d25d