-Stateless esxi hook for BOOTIF

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

View File

@ -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}