|
|
a0a3b4 |
From f45726652fd8c6fd6b5560e1142753bac62dc426 Mon Sep 17 00:00:00 2001
|
|
|
a0a3b4 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
a0a3b4 |
Date: Wed, 29 Jun 2016 10:49:00 +0200
|
|
|
a0a3b4 |
Subject: [PATCH] fcoe: check if needed for hostonly
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
---
|
|
|
a0a3b4 |
modules.d/95fcoe-uefi/module-setup.sh | 8 ++++++++
|
|
|
a0a3b4 |
modules.d/95fcoe/module-setup.sh | 9 +++++++++
|
|
|
a0a3b4 |
2 files changed, 17 insertions(+)
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
|
|
|
1755ca |
index f5277f48..242363ef 100755
|
|
|
a0a3b4 |
--- a/modules.d/95fcoe-uefi/module-setup.sh
|
|
|
a0a3b4 |
+++ b/modules.d/95fcoe-uefi/module-setup.sh
|
|
|
a0a3b4 |
@@ -4,6 +4,14 @@
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
# called by dracut
|
|
|
a0a3b4 |
check() {
|
|
|
a0a3b4 |
+ local _fcoe_ctlr
|
|
|
a0a3b4 |
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
|
a0a3b4 |
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
|
|
a0a3b4 |
+ [ -L $c ] || continue
|
|
|
a0a3b4 |
+ _fcoe_ctlr=$c
|
|
|
a0a3b4 |
+ done
|
|
|
a0a3b4 |
+ [ -z "$_fcoe_ctlr" ] && return 255
|
|
|
a0a3b4 |
+ }
|
|
|
a0a3b4 |
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
|
a0a3b4 |
[ -d /sys/firmware/efi ] || return 255
|
|
|
a0a3b4 |
}
|
|
|
a0a3b4 |
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
|
|
|
1755ca |
index 646cfa84..ba10b0ab 100755
|
|
|
a0a3b4 |
--- a/modules.d/95fcoe/module-setup.sh
|
|
|
a0a3b4 |
+++ b/modules.d/95fcoe/module-setup.sh
|
|
|
a0a3b4 |
@@ -3,6 +3,15 @@
|
|
|
a0a3b4 |
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
check() {
|
|
|
a0a3b4 |
+ local _fcoe_ctlr
|
|
|
a0a3b4 |
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
|
a0a3b4 |
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
|
|
a0a3b4 |
+ [ -L $c ] || continue
|
|
|
a0a3b4 |
+ _fcoe_ctlr=$c
|
|
|
a0a3b4 |
+ done
|
|
|
a0a3b4 |
+ [ -z "$_fcoe_ctlr" ] && return 255
|
|
|
a0a3b4 |
+ }
|
|
|
a0a3b4 |
+
|
|
|
a0a3b4 |
require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1
|
|
|
a0a3b4 |
return 0
|
|
|
a0a3b4 |
}
|