Skip to content

Commit

Permalink
Merge pull request #57 from smarterclayton/detect_bios
Browse files Browse the repository at this point in the history
Bug 1804012: On bare metal, detect system info
  • Loading branch information
openshift-merge-robot committed Feb 18, 2020
2 parents 28925c5 + 1177d45 commit a7d3a64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion text_collectors/virt.sh
Expand Up @@ -48,7 +48,11 @@ then
fi

if [[ "${count}" -eq 0 ]]; then
echo "virt_platform{type=\"none\"} 1" >>"${v}"
line="$( printf 'virt_platform{type="none",bios_vendor="%q",bios_version="%q",system_manufacturer="%q",system_product_name="%q",system_version="%q",baseboard_manufacturer="%q",baseboard_product_name="%q"} 1' \
"$( dmidecode -s bios-vendor )" "$( dmidecode -s bios-version )" \
"$( dmidecode -s system-manufacturer )" "$( dmidecode -s system-product-name )" "$( dmidecode -s system-version )" \
"$( dmidecode -s baseboard-manufacturer )" "$( dmidecode -s baseboard-product-name )" )"
echo "${line//\\ / }" >>"${v}"
fi
fi
mv "${v}" virt.prom

0 comments on commit a7d3a64

Please sign in to comment.