From a536821c02460bdd19be5dfbfb90b81826d3b51f Mon Sep 17 00:00:00 2001 From: Anthony Rubick <68485672+AnthonyMichaelTDM@users.noreply.github.com> Date: Mon, 28 Jul 2025 00:33:26 -0700 Subject: [PATCH] fix: be quiet when the $quiet flag is set My syslogs are basically flooded with that "--> disable dynamic fan control" message. Despite passing the -q flag in the systemd unit file, the logs from this program (and more specifically, that single message) make up at least 60% of my log entries. This fixes that issue by only printing the message when quiet is false. --- poweredge-fand.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poweredge-fand.pl b/poweredge-fand.pl index b05358c..aa1dd93 100755 --- a/poweredge-fand.pl +++ b/poweredge-fand.pl @@ -129,7 +129,7 @@ sub set_fans_servo { print "weighted_temp = $weighted_temp ; ambient_temp $ambient_temp\n" if $print_stats; if ((!defined $current_mode) or ($current_mode ne "set")) { - print "--> disable dynamic fan control\n"; + print "--> disable dynamic fan control\n" if !$quiet; system("ipmitool raw 0x30 0x30 0x01 0x00") == 0 or return 0; # if this fails, want to return telling caller not to think weve # made a change