2014-06-07 05:11:38 +00:00
|
|
|
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
|
2014-06-02 11:54:33 +00:00
|
|
|
|
2014-06-07 05:11:38 +00:00
|
|
|
When called with '--hostonly' we need to check if
|
|
|
|
any FCoE controllers are present. Otherwise we don't
|
|
|
|
need to include the module.
|
2014-06-02 11:54:33 +00:00
|
|
|
|
2014-06-07 05:11:38 +00:00
|
|
|
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
|
2014-06-02 11:54:33 +00:00
|
|
|
@@ -43,7 +43,16 @@ cmdline() {
|
|
|
|
|
|
|
|
# called by dracut
|
|
|
|
check() {
|
|
|
|
+ [[ $hostonly ]] || [[ $mount_needs ]] && {
|
|
|
|
+ for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
|
|
|
+ [ -L $c ] || continue
|
2014-06-07 05:11:38 +00:00
|
|
|
+ break;
|
2014-06-02 11:54:33 +00:00
|
|
|
+ done
|
|
|
|
+ return 255
|
|
|
|
+ }
|
2014-06-07 05:11:38 +00:00
|
|
|
+
|
|
|
|
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
|
2014-06-02 11:54:33 +00:00
|
|
|
+
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2014-06-07 05:11:38 +00:00
|
|
|
--
|
|
|
|
1.8.4.5
|
|
|
|
|