dracut/0055-95fcoe-Only-install-fcoe-module-if-required.patch

39 lines
1.0 KiB
Diff
Raw Normal View History

From bdf48e8e59056ccd44b3df2f53d298a74cabfab7 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 30 May 2014 11:00:59 +0200
Subject: [PATCH] 95fcoe: Only install fcoe module if required
When called with '--hostonly' we need to check if
any FCoE controllers are present. Otherwise we don't
need to include the module.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
modules.d/95fcoe/module-setup.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index 9af8c71..7abfb01 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -43,7 +43,16 @@ cmdline() {
# called by dracut
check() {
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
+ [ -L $c ] || continue
+ break;
+ done
+ return 255
+ }
+
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
+
return 0
}
--
1.8.4.5