From 78e30ddbee3bfbd45e2082cc37dbee59d2a766c7 Mon Sep 17 00:00:00 2001 From: Tigerblue77 <37409593+tigerblue77@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:02:03 +0000 Subject: [PATCH] Variable & function renaming --- Dell_iDRAC_fan_controller.sh | 18 +++++++++--------- functions.sh | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dell_iDRAC_fan_controller.sh b/Dell_iDRAC_fan_controller.sh index 36664b5..0d7c65c 100644 --- a/Dell_iDRAC_fan_controller.sh +++ b/Dell_iDRAC_fan_controller.sh @@ -54,7 +54,7 @@ echo "" TABLE_HEADER_PRINT_COUNTER=$TABLE_HEADER_PRINT_INTERVAL # 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 IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=true @@ -85,10 +85,10 @@ while true; do COMMENT=" -" # Check if CPU 1 is overheating then apply Dell default dynamic fan control profile if true if CPU1_OVERHEATING; then - apply_Dell_fan_control_profile + apply_Dell_default_fan_control_profile - if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then - IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true + if ! $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then + IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=true # 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 @@ -100,18 +100,18 @@ while true; do fi # 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 - apply_Dell_fan_control_profile + apply_Dell_default_fan_control_profile - if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then - IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true + if ! $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then + IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED=true COMMENT="CPU 2 temperature is too high, Dell default dynamic fan control profile applied for safety" fi else apply_user_fan_control_profile # Check if user fan control profile is applied then apply it if not - if $IS_DELL_FAN_CONTROL_PROFILE_APPLIED; then - IS_DELL_FAN_CONTROL_PROFILE_APPLIED=false + if $IS_DELL_DEFAULT_FAN_CONTROL_PROFILE_APPLIED; then + 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." fi fi diff --git a/functions.sh b/functions.sh index 7e1d0d6..0503357 100644 --- a/functions.sh +++ b/functions.sh @@ -1,6 +1,6 @@ # Define global functions # 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 ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x01 0x01 > /dev/null 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 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 if ! "$KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT"; then