Adding options for 14gen Dell servers via env var
This commit is contained in:
parent
8610b3bd75
commit
9fbcd12a49
3 changed files with 34 additions and 4 deletions
36
functions.sh
36
functions.sh
|
|
@ -38,10 +38,24 @@ function retrieve_temperatures () {
|
|||
|
||||
# Parse CPU data
|
||||
local CPU_DATA=$(echo "$DATA" | grep "3\." | grep -Po '\d{2}')
|
||||
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}')
|
||||
if $14_GEN
|
||||
then
|
||||
# 14 Gen server or newer
|
||||
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
||||
else
|
||||
# 13 Gen server or older
|
||||
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}')
|
||||
fi
|
||||
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
then
|
||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
||||
if $14_GEN
|
||||
then
|
||||
# 14 Gen server or newer
|
||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $4;}')
|
||||
else
|
||||
# 13 Gen server or older
|
||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
||||
fi
|
||||
else
|
||||
CPU2_TEMPERATURE="-"
|
||||
fi
|
||||
|
|
@ -60,12 +74,26 @@ function retrieve_temperatures () {
|
|||
|
||||
function enable_third_party_PCIe_card_Dell_default_cooling_response () {
|
||||
# We could check the current cooling response before applying but it's not very useful so let's skip the test and apply directly
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
|
||||
if $14_GEN
|
||||
then
|
||||
# 14 Gen server or newer
|
||||
continue
|
||||
else
|
||||
# 13 Gen server or older
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
function disable_third_party_PCIe_card_Dell_default_cooling_response () {
|
||||
# We could check the current cooling response before applying but it's not very useful so let's skip the test and apply directly
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
|
||||
if $14_GEN
|
||||
then
|
||||
# 14 Gen server or newer
|
||||
continue
|
||||
else
|
||||
# 13 Gen server or older
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Returns :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue