Package: lm-sensors
Version: 1:3.6.0-7
Severity: normal

Dear Maintainer,

the fix for bug #664141 introduced a system-sleep hook that restart
fancontrol. It does that unconditionally, though, so that even if the
user disabled the service (via systemctl disable fancontrol.service),
it will be started. I think that is undesired behavior, and applied
this patch in the ubuntu package, which I'm submitting for your
consideration:

diff --git a/debian/fancontrol-systemd-sleep b/debian/fancontrol-systemd-sleep
index ffbdd0c5..ad7d99ee 100644
--- a/debian/fancontrol-systemd-sleep
+++ b/debian/fancontrol-systemd-sleep
@@ -2,7 +2,9 @@

 case "$1" in
   post)
-    /bin/systemctl restart fancontrol.service
+    if /bin/systemctl --quiet is-active fancontrol.service; then
+      /bin/systemctl restart fancontrol.service
+    fi
     exit 0
     ;;
 esac


With this patch, the following is the new behavior on resume:

Service is enabled and active --> is restarted
Service is disabled and active --> is restarted
Service is enabled and inactive --> is not restarted
Service is disabled and inactive --> is not restarted

Cheers!

Reply via email to