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:
parent
2d66ce6cff
commit
aa9407acf8
@ -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 ]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user