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