Cope with kernel bug around correct UUID handling by using dmidecode instead

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11732 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-03-03 00:14:09 +00:00
parent dad755c521
commit ea2f6034e6
2 changed files with 3 additions and 2 deletions

View File

@ -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=`cat /sys/devices/virtual/dmi/id/product_uuid`
UUID=`dmidecode -s system-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

View File

@ -20,7 +20,8 @@ fi
if [ -r /sys/devices/virtual/dmi/id/product_uuid ]; then
duid='default-duid "\\000\\004';
for i in `sed -e s/-//g -e 's/\(..\)/\1 /g' /sys/devices/virtual/dmi/id/product_uuid`; do
#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
octnum="\\"`printf "\\%03o" 0x$i`
duid=$duid$octnum
done