dracut/0055-95fcoe-Only-install-fcoe-module-if-required.patch
Stephan Kulow bb76751d8a Accepting request 236229 from home:hreinecke:branches:Base:System
- Rediff patches to match git repository
- 95fcoe: Check for FCoE devices prior to binaries
  * Modify 0055-95fcoe-Only-install-fcoe-module-if-required.patch
- 99base: Install chown instead of chgrp
  * Modify 0052-99base-Add-chown-binary.patch
- 95iscsi: do not try to detect iSCSI firmware during booting;
  should be handled via commandline parameter
  * Modify 0030-95iscsi-Autodetect-iSCSI-firmware.patch
- Rename patch:
  * old: 0051-mkinitrd-suse-add-update-booloader-message.patch
    new: 0051-mkinitrd-suse-add-update-bootloader-message.patch

OBS-URL: https://build.opensuse.org/request/show/236229
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=157
2014-06-07 05:11:38 +00:00

39 lines
1.0 KiB
Diff

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