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

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