Fix genduiduuid.sh to work without concern over ISC code treating a printable character specially

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9614 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2011-05-17 13:54:48 +00:00
parent 37722e2e56
commit 3c139a074d

View File

@ -6,9 +6,10 @@ if [ -r /sys/devices/virtual/dmi/id/product_uuid ]; then
for i in `sed -e s/-//g -e 's/\(..\)/\1 /g' /sys/devices/virtual/dmi/id/product_uuid`; do
num=`printf "%d" 0x$i`
octnum=`printf "\\%03o" 0x$i`
if [ $num -lt 127 -a $num -gt 34 ]; then
octnum=`printf $octnum`
fi
#Instead of hoping to be inside printable case, just make them all octal codes
# if [ $num -lt 127 -a $num -gt 34 ]; then
# octnum=`printf $octnum`
# fi
duid=$duid$octnum
done
duid=$duid'";'