]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe-uefi: Test for EFI firmware
authorHannes Reinecke <hare@suse.de>
Mon, 23 Mar 2015 16:12:18 +0000 (17:12 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 3 Jul 2015 12:04:19 +0000 (14:04 +0200)
The fcoe-uefi module should test for EFI firmware when called
in 'hostonly' mode; of no EFI firmware is found then the module
doesn't need to be included.

References: bnc#882412

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 6755c208556be7a85c76e731de48a56f56e81c4c)

modules.d/95fcoe-uefi/module-setup.sh

index 0fb06e23383035113afdf3d33b936821560cf017..f5277f485df062cce33cd6999abdb39425f1508a 100755 (executable)
@@ -4,6 +4,9 @@
 
 # called by dracut
 check() {
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
+        [ -d /sys/firmware/efi ] || return 255
+    }
     require_binaries dcbtool fipvlan lldpad ip readlink || return 1
     return 0
 }