From c08b1d2a0f3da4b45c5f8926553f36c879fc2a43 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 6 Mar 2012 15:55:05 +0000 Subject: [PATCH] Have IPv6 setup in ESXi5 tolerate 5.(whatever) releases. Correct for the fact that ESXi presents UUID without byte mangling git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11765 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup b/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup index 45c93f5da..3f6651714 100644 --- a/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup +++ b/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup @@ -1,10 +1,9 @@ #!/bin/sh retval=${SUCCESS} -if [ `uname -r` == '5.0.0' ]; then +case `uname -r` in 5.*) #if [ `uname -r` == '5.0.0' ]; then #duid=default-duid "\000\001\000\001LnC\304\000\020\030^\340\334"; duid='default-duid "\000\004'; - - for i in `vsish -e get /hardware/bios/dmiInfo|grep -A15 UUID|sed -e 's/.*://'|sed -e ':a;N;$!ba;s/\n//g'`; do + for i in `vsish -e get /hardware/bios/dmiInfo|grep -A15 UUID|sed -e :a -e '$!N;s/\n/ /;ta;s/ //g;s/:/ /g;s/\[[^]]*\]//g;s/UUID *//;s/^\(0x..\) \(0x..\) \(0x..\) \(0x..\) \(0x..\) \(0x..\) \(0x..\) \(0x..\)/\4 \3 \2 \1 \6 \5 \8 \7/'`; do num=`printf "%d" $i` tnum=`printf "\\%03o" $i` duid=$duid$tnum @@ -13,6 +12,6 @@ if [ `uname -r` == '5.0.0' ]; then echo $duid > /etc/dhclient6-vmk0.leases localcli network firewall ruleset set -r DHCPv6 -e y localcli network ip interface ipv6 set -i vmk0 -d y -fi +esac return $retval