-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
This commit is contained in:
jbjohnso 2010-06-04 13:32:43 +00:00
parent cd566a825c
commit 3399c1b8ae
5 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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