]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe-uefi: Add check for usage 326/head
authorFabian Vogt <fvogt@suse.com>
Tue, 27 Sep 2016 10:41:17 +0000 (12:41 +0200)
committerDaniel Molkentin <dmolkentin@suse.com>
Fri, 15 Dec 2017 20:19:30 +0000 (21:19 +0100)
References: boo#965477

fcoe-uefi gets included by default on EFI systems,
as it does not do the same check that fcoe does,
therefore needlessly pulling in network modules.
This patch copies the check from fcoe to fcoe-uefi.

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

index c9ff3c2f122bd3bfcf48a6abc83577e6d4e3323f..a464df5a04ab502dba85aa4a1c555a15544ebba8 100755 (executable)
@@ -12,6 +12,11 @@ check() {
     }
     [[ $hostonly ]] || [[ $mount_needs ]] && {
         [ -d /sys/firmware/efi ] || return 255
+        for c in /sys/bus/fcoe/devices/ctlr_* ; do
+            [ -L $c ] || continue
+            fcoe_ctlr=$c
+        done
+        [ -z "$fcoe_ctlr" ] && return 255
     }
     require_binaries dcbtool fipvlan lldpad ip readlink || return 1
     return 0