diff --git a/xCAT-server/share/xcat/scripts/genduiduuid.sh b/xCAT-server/share/xcat/scripts/genduiduuid.sh index 8961325d1..1cfa20dfa 100644 --- a/xCAT-server/share/xcat/scripts/genduiduuid.sh +++ b/xCAT-server/share/xcat/scripts/genduiduuid.sh @@ -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