From b5350b91225d49e1f3a05edfc8656383fe90ba07 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 6 Mar 2012 15:55:30 +0000 Subject: [PATCH] Change Genesis to match MS behavior git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11767 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/dodiscovery | 2 +- xCAT-nbroot2/doxcat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-nbroot2/dodiscovery b/xCAT-nbroot2/dodiscovery index 13264df7f..b70305c94 100755 --- a/xCAT-nbroot2/dodiscovery +++ b/xCAT-nbroot2/dodiscovery @@ -71,7 +71,7 @@ elif [ -r /proc/device-tree/model ]; then #POWER fi CPUCOUNT=`cat /proc/cpuinfo |grep "model name"|wc -l` MEMORY=`cat /proc/meminfo |grep MemTotal|awk '{print $2}'` -UUID=`dmidecode -s system-uuid` +UUID=`sed -e 's/\(..\)\(..\)\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)/\4\3\2\1-\6\5-\8\7/' /sys/devices/virtual/dmi/id/product_uuid` grep "model name" /proc/cpuinfo | while read line; do #to avoid pulling in tail, we do a goofy thing echo $line > /tmp/cpumod done diff --git a/xCAT-nbroot2/doxcat b/xCAT-nbroot2/doxcat index 8a045f7e3..cbda11f1b 100755 --- a/xCAT-nbroot2/doxcat +++ b/xCAT-nbroot2/doxcat @@ -20,8 +20,8 @@ fi if [ -r /sys/devices/virtual/dmi/id/product_uuid ]; then duid='default-duid "\\000\\004'; - #product_uuid in sysfs fails to cope with endianness of SMBIOS 2.6 - for i in `dmidecode -s system-uuid|sed -e s/-//g -e 's/\(..\)/\1 /g'`; do + #product_uuid in sysfs fails to cope with endianness of SMBIOS 2.6, unconditionnaly swap. Technically leads to incorrect DUID in 'older' systems but matches MS behavior + for i in `sed -e 's/\(..\)\(..\)\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)/\4\3\2\1-\6\5-\8\7/;s/-//g;s/\(..\)/\1 /g' /sys/devices/virtual/dmi/id/product_uuid`; do octnum="\\"`printf "\\%03o" 0x$i` duid=$duid$octnum done