]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: Do not overwrite FCoE configuration
authorHannes Reinecke <hare@suse.de>
Tue, 16 Aug 2016 11:26:07 +0000 (13:26 +0200)
committerDaniel Molkentin <dmolkentin@suse.com>
Fri, 15 Dec 2017 17:51:49 +0000 (18:51 +0100)
If the installation already has a FCoE configuration we should
not attempt to overwrite it but rather use the pre-defined
configuration.

References: bsc#993861

Signed-off-by: Hannes Reinecke <hare@suse.com>
modules.d/95fcoe/fcoe-up.sh
modules.d/95fcoe/module-setup.sh

index ecd007d7eed235b60f69f52b06e1707184c59dd5..b7cc8e6cd284183dbb0bbaeed75b871690901974 100755 (executable)
@@ -38,6 +38,7 @@ netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
 netdriver=${netdriver##*/}
 
 write_fcoemon_cfg() {
+    [ -f /etc/fcoe/cfg-$netif ] && return
     echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif
     if [ "$dcb" = "dcb" ]; then
         echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif
index eabb21c7e1c78d7247884f3bc144a75092571538..aae158f28d1c22c7b6e1a1b9d86d19ddbefca113 100755 (executable)
@@ -94,6 +94,8 @@ install() {
         local _fcoeconf=$(cmdline)
         [[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf"
     fi
+    inst_multiple /etc/fcoe/cfg-*
+
     inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up"
     inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd"
     inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"