From b5717ba88b4ff6e7db3fb6e300b4b422f5820c2e Mon Sep 17 00:00:00 2001 From: ertaozh Date: Mon, 23 Nov 2015 21:25:43 -0500 Subject: [PATCH] fix issue 457: xCAT 2.11 / S822LC: Node Discovery failed due to MTM with spaces --- xCAT-genesis-scripts/bin/dodiscovery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-scripts/bin/dodiscovery b/xCAT-genesis-scripts/bin/dodiscovery index d1241f82d..7bc46f6e2 100755 --- a/xCAT-genesis-scripts/bin/dodiscovery +++ b/xCAT-genesis-scripts/bin/dodiscovery @@ -81,14 +81,14 @@ if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86 elif [ -r /proc/device-tree/model ]; then #POWER #MTM=`cat /proc/device-tree/model |awk -F, '{print $2}'` - MTM=`cat /proc/device-tree/model | sed -e 's/\^.*,//'` + MTM=`cat /proc/device-tree/model -vT | sed -e 's/^.*,//' | sed -e 's/^[\t ]*//'| sed -e 's/[\t ]*\^@//'` CPUCOUNT=`cat /proc/cpuinfo |grep -e "^cpu\s*:"|wc -l` PLATFORM=`cat /proc/cpuinfo | grep -e "^platform\s*:" | awk '{print \$3}'` grep -e "^cpu\s*:" /proc/cpuinfo | while read line; do #to avoid pulling in tail, we do a goofy thing echo $line > /tmp/cpumod done CPUTYPE=`cat /tmp/cpumod|awk -F':' '{print $2}'|sed -e 's/^ //'` - SERIAL=`cat /proc/device-tree/system-id` + SERIAL=`cat /proc/device-tree/system-id -vT | sed -e 's/^.*,//' | sed -e 's/^[\t ]*//'| sed -e 's/[\t ]*\^@//'` UUID=`sed -e 's/\(..\)\(..\)\(..\)\(..\)-\(..\)\(..\)-\(..\)\(..\)/\4\3\2\1-\6\5-\8\7/' /proc/sys/kernel/random/uuid` fi