primarynic and installnic can be set to mac address

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5330 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-03-02 11:29:01 +00:00
parent 2d66ce6cff
commit aa9407acf8
3 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,8 @@ export PRINIC=#TABLE:noderes:THISNODE:primarynic#
if [ -z "$PRINIC" ]
then
export PRINIC=eth0
elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?` == "0" ]]; then
export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
fi
IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
if [ -z $IP ]

View File

@ -19,6 +19,8 @@ EOF
export PRINIC=#TABLE:noderes:$NODE:primarynic#
if [ -z "$PRINIC" ]; then
export PRINIC=eth0
elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?` == "0" ]]; then
export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
fi
if [ "$PRINIC" != "eth0" ]
then

View File

@ -19,6 +19,8 @@ EOF
export PRINIC=#TABLE:noderes:$NODE:primarynic#
if [ -z "$PRINIC" ]; then
export PRINIC=eth0
elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?` == "0" ]]; then
export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
fi
if [ "$PRINIC" != "eth0" ]
then