Have genduiduuid unconditionally interpret UUID as little-endian, to acheive consistent cross-platform interpretation of DUID

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11766 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-03-06 15:55:18 +00:00
parent c08b1d2a0f
commit 1ab36e3433

View File

@ -3,7 +3,7 @@ if [ ! -r /etc/redhat-release ] || ! grep "release 6" /etc/redhat-release >/dev/
fi
if [ -r /sys/devices/virtual/dmi/id/product_uuid ]; then
duid='default-duid "\000\004';
for i in `dmidecode -s system-uuid | sed -e s/-//g -e 's/\(..\)/\1 /g'`; do
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
num=`printf "%d" 0x$i`
octnum=`printf "\\%03o" 0x$i`
#Instead of hoping to be inside printable case, just make them all octal codes