Skip to content

Commit 6c2480f

Browse files
authored
dodiscovery: when parsing DMI FRU data, only ignore the product name if it is entirely whitespace, rather than just containing some (#7500)
1 parent ee5479c commit 6c2480f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xCAT-genesis-scripts/usr/bin/dodiscovery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86
9494
if [ -z "$MTM" ]; then
9595
FRU=`ipmitool fru print 0`
9696
if [ $? -eq 0 ]; then
97-
MTM=`echo "$FRU" | awk -F': ' '/Product Manufacturer/ {m=$2} /Product Name|Product Part Number/ {if (n==""||n~/\s+/||n=="NONE") {n=$2}} END {print m":"n}'`
97+
MTM=`echo "$FRU" | awk -F': ' '/Product Manufacturer/ {m=$2} /Product Name|Product Part Number/ {if (n==""||n~/^\s+$/||n=="NONE") {n=$2}} END {print m":"n}'`
9898
fi
9999
if [ -z "$MTM" -o "$MTM" == ":" ]; then
100100
logger -s -t $log_label -p local4.warning "Couldn't find MTM information in FRU, falling back to DMI (MTMS-based discovery may fail)"

0 commit comments

Comments
 (0)