dracut/0210-add_fcoe_uefi_check.patch

30 lines
1010 B
Diff
Raw Normal View History

From: Fabian Vogt <fvogt@suse.com>
Subject: fcoe-uefi: Add check for usage
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 | 5 +++++
1 file changed, 5 insertions(+)
Index: dracut-044/modules.d/95fcoe-uefi/module-setup.sh
===================================================================
--- dracut-044.orig/modules.d/95fcoe-uefi/module-setup.sh
+++ dracut-044/modules.d/95fcoe-uefi/module-setup.sh
@@ -4,6 +4,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