Harald Hoyer 3610a1
From dfbbb0baf5f1124ab387bbf6ab9ec592462c14bb Mon Sep 17 00:00:00 2001
Harald Hoyer 3610a1
From: Harald Hoyer <harald@hoyer.xyz>
Harald Hoyer 3610a1
Date: Mon, 18 Dec 2017 09:11:54 +0100
Harald Hoyer 3610a1
Subject: [PATCH] Merge pull request #326 from danimo/no_efi_fcoe_default
Harald Hoyer 3610a1
Harald Hoyer 3610a1
fcoe-uefi: Add check for usage
Harald Hoyer 3610a1
---
Harald Hoyer 3610a1
 modules.d/95fcoe-uefi/module-setup.sh | 5 +++++
Harald Hoyer 3610a1
 1 file changed, 5 insertions(+)
Harald Hoyer 3610a1
Harald Hoyer 3610a1
diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 3610a1
index c9ff3c2f..a464df5a 100755
Harald Hoyer 3610a1
--- a/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 3610a1
+++ b/modules.d/95fcoe-uefi/module-setup.sh
Harald Hoyer 3610a1
@@ -12,6 +12,11 @@ check() {
Harald Hoyer 3610a1
     }
Harald Hoyer 3610a1
     [[ $hostonly ]] || [[ $mount_needs ]] && {
Harald Hoyer 3610a1
         [ -d /sys/firmware/efi ] || return 255
Harald Hoyer 3610a1
+        for c in /sys/bus/fcoe/devices/ctlr_* ; do
Harald Hoyer 3610a1
+            [ -L $c ] || continue
Harald Hoyer 3610a1
+            fcoe_ctlr=$c
Harald Hoyer 3610a1
+        done
Harald Hoyer 3610a1
+        [ -z "$fcoe_ctlr" ] && return 255
Harald Hoyer 3610a1
     }
Harald Hoyer 3610a1
     require_binaries dcbtool fipvlan lldpad ip readlink || return 1
Harald Hoyer 3610a1
     return 0
Harald Hoyer 3610a1