Blame SOURCES/0271-95fcoe-uefi-Test-for-EFI-firmware.patch

64b87c
From 7b3178d9ad9b571312131bba34fd54460a7b4a25 Mon Sep 17 00:00:00 2001
64b87c
From: Hannes Reinecke <hare@suse.de>
64b87c
Date: Mon, 23 Mar 2015 17:12:18 +0100
64b87c
Subject: [PATCH] 95fcoe-uefi: Test for EFI firmware
64b87c
64b87c
The fcoe-uefi module should test for EFI firmware when called
64b87c
in 'hostonly' mode; of no EFI firmware is found then the module
64b87c
doesn't need to be included.
64b87c
64b87c
References: bnc#882412
64b87c
64b87c
Signed-off-by: Hannes Reinecke <hare@suse.de>
64b87c
Signed-off-by: Thomas Renninger <trenn@suse.de>
64b87c
(cherry picked from commit 6755c208556be7a85c76e731de48a56f56e81c4c)
64b87c
---
64b87c
 modules.d/95fcoe-uefi/module-setup.sh | 3 +++
64b87c
 1 file changed, 3 insertions(+)
64b87c
64b87c
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
64b87c
index 0fb06e2..f5277f4 100755
64b87c
--- a/modules.d/95fcoe-uefi/module-setup.sh
64b87c
+++ b/modules.d/95fcoe-uefi/module-setup.sh
64b87c
@@ -4,6 +4,9 @@
64b87c
 
64b87c
 # called by dracut
64b87c
 check() {
64b87c
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
64b87c
+        [ -d /sys/firmware/efi ] || return 255
64b87c
+    }
64b87c
     require_binaries dcbtool fipvlan lldpad ip readlink || return 1
64b87c
     return 0
64b87c
 }