27 lines
905 B
Diff
27 lines
905 B
Diff
|
dracut: Only add fcoe module in hostonly mode if there are active fcoe devices
|
||
|
|
||
|
This also avoids unnecessary warnings from require_binary checks.
|
||
|
In hostonly mode fcoe is not needed at all if there are no active fcoe
|
||
|
devices. So silently omit this module in this case.
|
||
|
|
||
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
||
|
|
||
|
Index: dracut-037/modules.d/95fcoe/module-setup.sh
|
||
|
===================================================================
|
||
|
--- dracut-037.orig/modules.d/95fcoe/module-setup.sh
|
||
|
+++ dracut-037/modules.d/95fcoe/module-setup.sh
|
||
|
@@ -43,6 +43,13 @@ cmdline() {
|
||
|
|
||
|
# called by dracut
|
||
|
check() {
|
||
|
+ # Only add in hostonly mode if fcoe devices exist
|
||
|
+ if [[ $hostonly ]]; then
|
||
|
+ ls /sys/bus/fcoe/devices/ctlr_* >/dev/null 2>&1
|
||
|
+ if [ $? -ne 0 ];then
|
||
|
+ return 255
|
||
|
+ fi
|
||
|
+ fi
|
||
|
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
|
||
|
return 0
|
||
|
}
|