From 208ca9615caa37c91cbe1ca2ede8fa40b8503227 Mon Sep 17 00:00:00 2001 From: Sean Cline Date: Tue, 21 Mar 2023 16:59:18 -0700 Subject: [PATCH] Fixing some if not true statements --- Dell_iDRAC_fan_controller.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Dell_iDRAC_fan_controller.sh b/Dell_iDRAC_fan_controller.sh index 0b28eb2..671d878 100644 --- a/Dell_iDRAC_fan_controller.sh +++ b/Dell_iDRAC_fan_controller.sh @@ -71,11 +71,7 @@ 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 - if $DELL_14_GEN - then - # 14 Gen Server - continue - else + if ! $DELL_14_GEN # 13 Gen or older server ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null fi @@ -83,11 +79,8 @@ function enable_third_party_PCIe_card_Dell_default_cooling_response () { 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 - if $DELL_14_GEN + if ! $DELL_14_GEN then - # 14 Gen Server - continue - else # 13 Gen or older server ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null fi