From d8c8c0e70d3627d7b842a6e302fdec7f62c934b4 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 14 May 2010 23:46:42 +0000 Subject: [PATCH] -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 --- xCAT-server/share/xcat/netboot/esxi/47.xcat-networking | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking b/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking index 96c9744a4..e8804388a 100644 --- a/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking +++ b/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking @@ -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}'`