diff --git a/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking b/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking new file mode 100644 index 000000000..96c9744a4 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/esxi/47.xcat-networking @@ -0,0 +1,14 @@ +#!/bin/sh +#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 BOOTIF | sed 's/.*BOOTIF=01-//'|sed 's/-/:/g'` +if [ ! -z "$MACADDR" ]; then + NIC=`esxcfg-nics -l|grep ${MACADDR}|awk '{print $1}'` + esxcfg-vswitch -a vSwitch0:64 + esxcfg-vswitch -A "Management Network" vSwitch0 + esxcfg-vmknic -a -i DHCP -P -p "Management Network" + esxcfg-init -R $MACADDR -K vmk0 +fi + +return ${SUCCESS}