]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: Add the rd.nofcoe option to disable the FCoE module from the command line
authorPatrick Talbert <ptalbert@redhat.com>
Fri, 30 Nov 2018 08:28:09 +0000 (09:28 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 18 Jan 2019 13:10:19 +0000 (14:10 +0100)
Images built with the fcoe module will always run the lldpad
service as part of their pre-trigger scripts if the network
is active. This prevents network installations in
environments where, for security reasons, LLDPDU frames
cause a switchport shutdown.

Add a new rd.nofcoe option to cause dracut to skip the
lldpad.sh script and the entire 95-fcoe module.

Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
dracut.cmdline.7.asc
modules.d/95fcoe/lldpad.sh
modules.d/95fcoe/parse-fcoe.sh

index 3cee5a00b8bcea7afa5f10d3de2445279c066a5b..c45cdf57c48f389ad433bd0a333315dbd178c5cf 100644 (file)
@@ -765,6 +765,9 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
 
 FCoE
 ~~~~
+**rd.nofcoe=0**::
+    disable FCoE and lldpad
+
 **fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:__{fabric|vn2vn}__::
     Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
     _<MAC>_ or EDD settings. The second argument specifies if DCB
index d06a3bd818da0a3e3934b830c87e27692ed26e72..c32feeedf539c59ebb81ea3abf17d9a1cb0cdcbb 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if ! getargbool 0 rd.nofcoe ; then
+       info "rd.nofcoe=0: skipping lldpad activation"
+       exit 0
+fi
+
 # Note lldpad will stay running after switchroot, the system initscripts
 # are to kill it and start a new lldpad to take over. Data is transfered
 # between the 2 using a shm segment
index 75cca9a500854fea2d647f8c6d8410e479d43e60..748f7a98d4e6bd5f94f83c772ccfd6ad8cff0d4a 100755 (executable)
 # fcoe=eth0:nodcb:vn2vn
 # fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
 
+if ! getargbool 0 rd.nofcoe ; then
+       info "rd.nofcoe=0: skipping fcoe"
+       exit 0
+fi
+
 [ -z "$fcoe" ] && fcoe=$(getarg fcoe=)
 
 # If it's not set we don't continue