]> 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>
Tue, 2 Jun 2015 10:24:58 +0000 (12:24 +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>
modules.d/95fcoe-uefi/module-setup.sh

index 8b8c810da614bf8193036db893c419e0ad11944e..5d8477caf32be4ef4d5ec2c83369d610264f135c 100755 (executable)
@@ -2,6 +2,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
 }