From 3399c1b8ae7fe48fc954fa1fef8d72a7f63d9fde Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 4 Jun 2010 13:32:43 +0000 Subject: [PATCH] -Fix BOOTIF parsing for the 'correct' syntax git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6354 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/install/scripts/post.esx | 4 ++-- xCAT-server/share/xcat/install/scripts/post.rh | 4 ++-- xCAT-server/share/xcat/install/scripts/post.rh.iscsi | 4 ++-- xCAT-server/share/xcat/install/scripts/post.sles | 4 ++-- xCAT-server/share/xcat/install/scripts/post.sles11 | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.esx b/xCAT-server/share/xcat/install/scripts/post.esx index 70404c6f1..7f5f639f2 100644 --- a/xCAT-server/share/xcat/install/scripts/post.esx +++ b/xCAT-server/share/xcat/install/scripts/post.esx @@ -5,9 +5,9 @@ echo "post scripts" >/root/post.log export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic# if [ -z "$PRINIC" ] then - for karg in $(cat /proc/cmdline |sed -e 's/ /\n/g'); do + for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then - export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=}"|awk '{print $1}'` + export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` fi done if [ -z "$PRINIC" ]; then diff --git a/xCAT-server/share/xcat/install/scripts/post.rh b/xCAT-server/share/xcat/install/scripts/post.rh index 45df143cd..60b8e5e84 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh +++ b/xCAT-server/share/xcat/install/scripts/post.rh @@ -9,9 +9,9 @@ then fi if [ -z "$PRINIC" ] then - for karg in $(cat /proc/cmdline |sed -e 's/ /\n/g'); do + for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then - export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=}"|awk '{print $1}'` + export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` fi done if [ -z "$PRINIC" ]; then diff --git a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi index 21a8fe253..3215ff570 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh.iscsi +++ b/xCAT-server/share/xcat/install/scripts/post.rh.iscsi @@ -9,9 +9,9 @@ then fi if [ -z "$PRINIC" ] then - for karg in $(cat /proc/cmdline |sed -e 's/ /\n/g'); do + for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then - export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=}"|awk '{print $1}'` + export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` fi done if [ -z "$PRINIC" ]; then diff --git a/xCAT-server/share/xcat/install/scripts/post.sles b/xCAT-server/share/xcat/install/scripts/post.sles index fd376e163..9dd3a4ceb 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles +++ b/xCAT-server/share/xcat/install/scripts/post.sles @@ -23,9 +23,9 @@ then fi if [ -z "$PRINIC" ] then - for karg in $(cat /proc/cmdline |sed -e 's/ /\n/g'); do + for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then - export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=}"|awk '{print $1}'` + export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` fi done if [ -z "$PRINIC" ]; then diff --git a/xCAT-server/share/xcat/install/scripts/post.sles11 b/xCAT-server/share/xcat/install/scripts/post.sles11 index c665d0ed9..3c0780fa7 100644 --- a/xCAT-server/share/xcat/install/scripts/post.sles11 +++ b/xCAT-server/share/xcat/install/scripts/post.sles11 @@ -23,9 +23,9 @@ then fi if [ -z "$PRINIC" ] then - for karg in $(cat /proc/cmdline |sed -e 's/ /\n/g'); do + for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then - export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=}"|awk '{print $1}'` + export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` fi done if [ -z "$PRINIC" ]; then