From f5319690f57303b63da937198e16b8a2fc5aef34 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 6 Mar 2012 14:13:20 +0000 Subject: [PATCH] Change esxi DUID-UUID fixup to tolerate case where /hardware/machineUUID does not exist git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11763 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/esxi/38.xcat-enableipv6 | 5 +---- xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/esxi/38.xcat-enableipv6 b/xCAT-server/share/xcat/netboot/esxi/38.xcat-enableipv6 index bdf7193da..5d5b972eb 100644 --- a/xCAT-server/share/xcat/netboot/esxi/38.xcat-enableipv6 +++ b/xCAT-server/share/xcat/netboot/esxi/38.xcat-enableipv6 @@ -4,12 +4,9 @@ if [ `uname -r` == '4.1.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/machineUUID|grep \\\[|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 's/.*://'|sed -e ':a;N;$!ba;s/\n//g'`; do num=`printf "%d" $i` tnum=`printf "\\%03o" $i` - if [ $num -lt 127 -a $num -gt 31 ]; then - tnum=`printf $tnum` - fi duid=$duid$tnum done duid=$duid'";' diff --git a/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup b/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup index fd2fc5b5f..45c93f5da 100644 --- a/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup +++ b/xCAT-server/share/xcat/netboot/esxi/39.ipv6fixup @@ -4,12 +4,9 @@ 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/machineUUID|grep \\\[|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 's/.*://'|sed -e ':a;N;$!ba;s/\n//g'`; do num=`printf "%d" $i` tnum=`printf "\\%03o" $i` - if [ $num -lt 127 -a $num -gt 31 ]; then - tnum=`printf $tnum` - fi duid=$duid$tnum done duid=$duid'";'