]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe: check if needed for hostonly
authorHarald Hoyer <harald@redhat.com>
Wed, 29 Jun 2016 08:49:00 +0000 (10:49 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Jun 2016 08:50:58 +0000 (10:50 +0200)
modules.d/95fcoe-uefi/module-setup.sh
modules.d/95fcoe/module-setup.sh

index f5277f485df062cce33cd6999abdb39425f1508a..242363eff2a043bb294317665da49b7ae5522164 100755 (executable)
@@ -4,6 +4,14 @@
 
 # called by dracut
 check() {
+    local _fcoe_ctlr
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
+        for c in /sys/bus/fcoe/devices/ctlr_* ; do
+            [ -L $c ] || continue
+            _fcoe_ctlr=$c
+        done
+        [ -z "$_fcoe_ctlr" ] && return 255
+    }
     [[ $hostonly ]] || [[ $mount_needs ]] && {
         [ -d /sys/firmware/efi ] || return 255
     }
index 646cfa84e2f409d3bee85cfd9d62f0094ee9a54a..ba10b0ab156b37327676b44760f4727ecb31df76 100755 (executable)
@@ -3,6 +3,15 @@
 # ex: ts=8 sw=4 sts=4 et filetype=sh
 
 check() {
+    local _fcoe_ctlr
+    [[ $hostonly ]] || [[ $mount_needs ]] && {
+        for c in /sys/bus/fcoe/devices/ctlr_* ; do
+            [ -L $c ] || continue
+            _fcoe_ctlr=$c
+        done
+        [ -z "$_fcoe_ctlr" ] && return 255
+    }
+
     require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1
     return 0
 }