]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: Add shutdown script
authorHannes Reinecke <hare@suse.de>
Thu, 25 Aug 2016 07:36:06 +0000 (09:36 +0200)
committerDaniel Molkentin <danimo@molkentin.de>
Mon, 18 Dec 2017 20:48:07 +0000 (21:48 +0100)
We should be disabling the FCoE connection (which triggers sending
a LOGO internally) to logout from the target; this resets the target
and will avoid hitting a busy condition during reboots.

References: bsc#994860

Signed-off-by: Hannes Reinecke <hare@suse.com>
modules.d/95fcoe/module-setup.sh
modules.d/95fcoe/stop-fcoe.sh [new file with mode: 0755]

index e9a8300ee9e724be3907b7b99a141da5501f88d7..17bc125ec26cea572f0be2dfd92db441dfcb875f 100755 (executable)
@@ -108,6 +108,7 @@ install() {
     inst_hook pre-trigger 03 "$moddir/lldpad.sh"
     inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
     inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh"
+    inst_hook shutdown 40 "$moddir/stop-fcoe.sh"
     dracut_need_initqueue
 }
 
diff --git a/modules.d/95fcoe/stop-fcoe.sh b/modules.d/95fcoe/stop-fcoe.sh
new file mode 100755 (executable)
index 0000000..d2462b3
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+for f in /sys/bus/fcoe/devices/ctlr_* ; do
+    [ -e $f ] || continue
+    echo 0 > $f/enabled
+done