Variable & function renaming
This commit is contained in:
parent
81bd752b37
commit
78e30ddbee
2 changed files with 11 additions and 11 deletions
|
|
@ -54,7 +54,7 @@ echo ""
|
||||||
|
|
||||||
TABLE_HEADER_PRINT_COUNTER=$TABLE_HEADER_PRINT_INTERVAL
|
TABLE_HEADER_PRINT_COUNTER=$TABLE_HEADER_PRINT_INTERVAL
|
||||||
# Set the flag used to check if the active fan control profile has changed
|
# Set the flag used to check if the active fan control profile has changed
|
||||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=true
|
||||||
|
|
||||||
# Check present sensors
|
# Check present sensors
|
||||||
IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=true
|
IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=true
|
||||||
|
|
@ -85,10 +85,10 @@ while true; do
|
||||||
COMMENT=" -"
|
COMMENT=" -"
|
||||||
# Check if CPU 1 is overheating then apply Dell default dynamic fan control profile if true
|
# Check if CPU 1 is overheating then apply Dell default dynamic fan control profile if true
|
||||||
if CPU1_OVERHEATING; then
|
if CPU1_OVERHEATING; then
|
||||||
apply_Dell_fan_control_profile
|
apply_Dell_default_fan_control_profile
|
||||||
|
|
||||||
if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then
|
if ! $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then
|
||||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=true
|
||||||
|
|
||||||
# If CPU 2 temperature sensor is present, check if it is overheating too.
|
# If CPU 2 temperature sensor is present, check if it is overheating too.
|
||||||
# Do not apply Dell default dynamic fan control profile as it has already been applied before
|
# Do not apply Dell default dynamic fan control profile as it has already been applied before
|
||||||
|
|
@ -100,18 +100,18 @@ while true; do
|
||||||
fi
|
fi
|
||||||
# If CPU 2 temperature sensor is present, check if it is overheating then apply Dell default dynamic fan control profile if true
|
# If CPU 2 temperature sensor is present, check if it is overheating then apply Dell default dynamic fan control profile if true
|
||||||
elif $IS_CPU2_TEMPERATURE_SENSOR_PRESENT && CPU2_OVERHEATING; then
|
elif $IS_CPU2_TEMPERATURE_SENSOR_PRESENT && CPU2_OVERHEATING; then
|
||||||
apply_Dell_fan_control_profile
|
apply_Dell_default_fan_control_profile
|
||||||
|
|
||||||
if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then
|
if ! $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then
|
||||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=true
|
||||||
COMMENT="CPU 2 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
COMMENT="CPU 2 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
apply_user_fan_control_profile
|
apply_user_fan_control_profile
|
||||||
|
|
||||||
# Check if user fan control profile is applied then apply it if not
|
# Check if user fan control profile is applied then apply it if not
|
||||||
if $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then
|
if $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then
|
||||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=false
|
IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=false
|
||||||
COMMENT="CPU temperature decreased and is now OK (<= $CPU_TEMPERATURE_THRESHOLD°C), user's fan control profile applied."
|
COMMENT="CPU temperature decreased and is now OK (<= $CPU_TEMPERATURE_THRESHOLD°C), user's fan control profile applied."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Define global functions
|
# Define global functions
|
||||||
# This function applies Dell's default dynamic fan control profile
|
# This function applies Dell's default dynamic fan control profile
|
||||||
function apply_Dell_fan_control_profile() {
|
function apply_Dell_default_fan_control_profile() {
|
||||||
# Use ipmitool to send the raw command to set fan control to Dell default
|
# Use ipmitool to send the raw command to set fan control to Dell default
|
||||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x01 0x01 > /dev/null
|
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x01 0x01 > /dev/null
|
||||||
CURRENT_FAN_CONTROL_PROFILE="Dell default dynamic fan control profile"
|
CURRENT_FAN_CONTROL_PROFILE="Dell default dynamic fan control profile"
|
||||||
|
|
@ -119,7 +119,7 @@ function disable_third_party_PCIe_card_Dell_default_cooling_response() {
|
||||||
|
|
||||||
# Prepare traps in case of container exit
|
# Prepare traps in case of container exit
|
||||||
function graceful_exit() {
|
function graceful_exit() {
|
||||||
apply_Dell_fan_control_profile
|
apply_Dell_default_fan_control_profile
|
||||||
|
|
||||||
# Reset third-party PCIe card cooling response to Dell default depending on the user's choice at startup
|
# Reset third-party PCIe card cooling response to Dell default depending on the user's choice at startup
|
||||||
if ! "$KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT"; then
|
if ! "$KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT"; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue