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

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