diff --git a/xCAT-genesis-scripts/usr/bin/dodiscovery b/xCAT-genesis-scripts/usr/bin/dodiscovery index 9657c6bbe9..1fe0e05901 100755 --- a/xCAT-genesis-scripts/usr/bin/dodiscovery +++ b/xCAT-genesis-scripts/usr/bin/dodiscovery @@ -112,7 +112,8 @@ if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86 echo $line > /tmp/cpumod done CPUTYPE=`cat /tmp/cpumod|awk -F':' '{print $2}'|sed -e 's/^ //'` - UUID=`sed -e 's/\(..\)\(..\)\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)/\4\3\2\1-\6\5-\8\7/' /sys/devices/virtual/dmi/id/product_uuid` + # makedhcp derives the firmware DUID from vpd.uuid, so report the UUID that dmidecode prints. + UUID=`cat /sys/devices/virtual/dmi/id/product_uuid` elif [ -r /proc/device-tree/model ]; then #POWER MTM=`cat /proc/device-tree/model -vT | sed -e 's/^.*,//' | sed -e 's/^[\t ]*//'| sed -e 's/[\t ]*\^@//'` diff --git a/xCAT-genesis-scripts/usr/bin/doxcat b/xCAT-genesis-scripts/usr/bin/doxcat index 2338e3337b..76fdd69ab8 100755 --- a/xCAT-genesis-scripts/usr/bin/doxcat +++ b/xCAT-genesis-scripts/usr/bin/doxcat @@ -67,7 +67,7 @@ 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, unconditionnaly swap. Technically leads to incorrect DUID in 'older' systems but matches MS behavior + # EDK2 firmware sends the SMBIOS bytes, and product_uuid prints the first three fields byte-swapped. 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