712866
From 6db59a1630f80ab4a5d6a701f3063aa5a6aaccc9 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 20 Jun 2014 14:27:09 +0200
712866
Subject: [PATCH] deprecate "ip=ibft" kernel command line parameter
712866
712866
rd.iscsi.ibft[=1] should be used instead.
712866
712866
Thing is, 'ip=ibft' is not really an ip setting, but rather a marker
712866
that iBFT should be evaluated.
712866
712866
Also removed the trigger of the warning:
712866
"Warning: Please supply bootdev argument for multiple ip= lines"
712866
712866
(cherry picked from commit 5580e4c176c92624054691a8e12cffe8622cc1a0)
712866
---
712866
 dracut.cmdline.7.asc                 | 7 ++++---
712866
 modules.d/40network/parse-ibft.sh    | 6 +++---
712866
 modules.d/40network/parse-ip-opts.sh | 4 ++++
712866
 3 files changed, 11 insertions(+), 6 deletions(-)
712866
712866
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
5c6c2a
index 985285b4..10550eef 100644
712866
--- a/dracut.cmdline.7.asc
712866
+++ b/dracut.cmdline.7.asc
712866
@@ -437,7 +437,7 @@ USB Android phone::
712866
 * enp0s29u1u2
712866
 =====================
712866
 
712866
-**ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__::
712866
+**ip=**__{dhcp|on|any|dhcp6|auto6}__::
712866
     dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp,
712866
     loop sequentially through all interfaces (eth0, eth1, ...) and use the first
712866
     with a valid DHCP root-path.
712866
@@ -446,8 +446,6 @@ USB Android phone::
712866
 
712866
     dhcp6::: IPv6 DHCP
712866
 
712866
-    ibft::: iBFT autoconfiguration
712866
-
712866
 **ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]::
712866
     This parameter can be specified multiple times.
712866
 +
712866
@@ -661,6 +659,9 @@ will result in
712866
 iscsistart -b --param node.session.timeo.replacement_timeout=30
712866
 --
712866
 
712866
+**rd.iscsi.ibft** **rd.iscsi.ibft=1**:
712866
+    Turn on iBFT autoconfiguration for the interfaces
712866
+
712866
 FCoE
712866
 ~~~~
712866
 **fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
712866
diff --git a/modules.d/40network/parse-ibft.sh b/modules.d/40network/parse-ibft.sh
5c6c2a
index 9776c755..643313dc 100755
712866
--- a/modules.d/40network/parse-ibft.sh
712866
+++ b/modules.d/40network/parse-ibft.sh
712866
@@ -5,6 +5,6 @@
712866
 command -v getarg >/dev/null          || . /lib/dracut-lib.sh
712866
 command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
712866
 
712866
-# If ibft is requested, read ibft vals and write ip=XXX cmdline args
712866
-[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline
712866
-
712866
+if getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
712866
+    ibft_to_cmdline
712866
+fi
712866
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
5c6c2a
index 7e735741..b029d007 100755
712866
--- a/modules.d/40network/parse-ip-opts.sh
712866
+++ b/modules.d/40network/parse-ip-opts.sh
712866
@@ -25,6 +25,10 @@ fi
712866
 if [ -z "$NEEDBOOTDEV" ] ; then
712866
     count=0
712866
     for p in $(getargs ip=); do
712866
+        case "$p" in
712866
+            ibft)
712866
+                continue;;
712866
+        esac
712866
         count=$(( $count + 1 ))
712866
     done
712866
     [ $count -gt 1 ] && NEEDBOOTDEV=1