From b7c37035e9a234107310a2f86e6fd261a663ae38 Mon Sep 17 00:00:00 2001 From: Tigerblue77 <37409593+tigerblue77@users.noreply.github.com> Date: Sat, 10 Feb 2024 21:30:41 +0000 Subject: [PATCH] Fixed server manufacturer detection on Gen 11 (R410, R610, etc...) --- functions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions.sh b/functions.sh index 3404859..6acde9d 100644 --- a/functions.sh +++ b/functions.sh @@ -90,4 +90,14 @@ function get_Dell_server_model () { SERVER_MANUFACTURER=$(echo "$IPMI_FRU_content" | grep "Product Manufacturer" | awk -F ': ' '{print $2}') SERVER_MODEL=$(echo "$IPMI_FRU_content" | grep "Product Name" | awk -F ': ' '{print $2}') + + # Check if SERVER_MANUFACTURER is empty, if yes, assign value based on "Board Mfg" + if [ -z "$SERVER_MANUFACTURER" ]; then + SERVER_MANUFACTURER=$(echo "$IPMI_FRU_content" | tr -s ' ' | grep "Board Mfg :" | awk -F ': ' '{print $2}') + fi + + # Check if SERVER_MODEL is empty, if yes, assign value based on "Board Product" + if [ -z "$SERVER_MODEL" ]; then + SERVER_MODEL=$(echo "$IPMI_FRU_content" | tr -s ' ' | grep "Board Product :" | awk -F ': ' '{print $2}') + fi }