dracut/0102-fcoe-check-if-needed-for-hostonly.patch
Harald Hoyer 414eba6e75 dracut-044-109
- git snapshot
2016-08-18 13:30:10 +02:00

51 lines
1.6 KiB
Diff

From 5a3773dbe6b48a872295d6a10f87e5329f0113a1 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 29 Jun 2016 10:49:00 +0200
Subject: [PATCH] fcoe: check if needed for hostonly
(cherry picked from commit f45726652fd8c6fd6b5560e1142753bac62dc426)
---
modules.d/95fcoe-uefi/module-setup.sh | 8 ++++++++
modules.d/95fcoe/module-setup.sh | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
index 5d8477c..c9ff3c2 100755
--- a/modules.d/95fcoe-uefi/module-setup.sh
+++ b/modules.d/95fcoe-uefi/module-setup.sh
@@ -2,6 +2,14 @@
# called by dracut
check() {
+ local _fcoe_ctlr
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
+ [ -L $c ] || continue
+ _fcoe_ctlr=$c
+ done
+ [ -z "$_fcoe_ctlr" ] && return 255
+ }
[[ $hostonly ]] || [[ $mount_needs ]] && {
[ -d /sys/firmware/efi ] || return 255
}
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index 059bfde..531ea0d 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -2,12 +2,13 @@
# called by dracut
check() {
+ local _fcoe_ctlr
[[ $hostonly ]] || [[ $mount_needs ]] && {
for c in /sys/bus/fcoe/devices/ctlr_* ; do
[ -L $c ] || continue
- fcoe_ctlr=$c
+ _fcoe_ctlr=$c
done
- [ -z "$fcoe_ctlr" ] && return 255
+ [ -z "$_fcoe_ctlr" ] && return 255
}
require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1