Blame SOURCES/0197-Installing-an-OS-with-VLAN-enabled-to-an-ISCSI-LUN-f.patch

712866
From 7b8f2e7a7bdd412dd1bd776967462de8a51683b9 Mon Sep 17 00:00:00 2001
712866
From: "Praveen_Paladugu@Dell.com" <Praveen_Paladugu@Dell.com>
712866
Date: Tue, 10 Jun 2014 10:35:16 -0500
712866
Subject: [PATCH] Installing an OS with VLAN enabled to an ISCSI LUN (from
712866
 ibft)
712866
712866
When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly.
712866
712866
Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config
712866
712866
To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20):
712866
712866
(cherry picked from commit f4eb0d98048d51a0782d4a7137f699de174a65e4)
712866
---
712866
 modules.d/40network/net-lib.sh | 7 ++++++-
712866
 1 file changed, 6 insertions(+), 1 deletion(-)
712866
712866
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
712866
index d53e1a6..90337f3 100755
712866
--- a/modules.d/40network/net-lib.sh
712866
+++ b/modules.d/40network/net-lib.sh
712866
@@ -233,15 +233,20 @@ ibft_to_cmdline() {
712866
                    case "$vlan" in
712866
                        [0-9]*)
712866
                            echo "vlan=$dev.$vlan:$dev"
712866
+                           echo $mac > /tmp/net.${dev}.${vlan}.has_ibft_config
712866
                            ;;
712866
                        *)
712866
                            echo "vlan=$vlan:$dev"
712866
+                           echo $mac > /tmp/net.${vlan}.has_ibft_config
712866
                            ;;
712866
                    esac
712866
+               else
712866
+                   echo $mac > /tmp/net.${dev}.has_ibft_config
712866
                fi
712866
+            else
712866
+                echo $mac > /tmp/net.${dev}.has_ibft_config
712866
             fi
712866
 
712866
-            echo $mac > /tmp/net.${dev}.has_ibft_config
712866
         done
712866
     ) >> /etc/cmdline.d/40-ibft.conf
712866
 }