-Auto-disable hook when MAC= detected

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6127 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-05-14 23:46:42 +00:00
parent 446a97fd6d
commit d8c8c0e70d

View File

@ -2,6 +2,10 @@
#Default networking config supporting BOOTIF semantics
#bring up one interface, if bonding, management software can do that
#after the fact
MACADDR=`vsish -e get /system/bootCmdLine | grep MAC | sed 's/.*MAC=//'|sed 's/-/:/g'`
if [ ! -z "$MACADDR" ]; then #if MAC= syntax detected, skip execution
return ${SUCCESS}
fi
MACADDR=`vsish -e get /system/bootCmdLine | grep BOOTIF | sed 's/.*BOOTIF=01-//'|sed 's/-/:/g'`
if [ ! -z "$MACADDR" ]; then
NIC=`esxcfg-nics -l|grep ${MACADDR}|awk '{print $1}'`