Package: fancontrol
Version: 1:3.4.0-4
Severity: important
Tags: patch

Dear Maintainer,

  ***
pwmconfig generated config:
Common settings:
  INTERVAL=10

Settings for hwmon2/pwm2:
  Depends on hwmon1/temp1_input
  Controls 
hwmon2/fan5_input+hwmon2/fan4_input+hwmon2/fan3_input+hwmon2/fan1_input
  MINTEMP=20
  MAXTEMP=45
  MINSTART=150
  MINSTOP=100
  MINPWM=100
  MAXPWM=255

fancontrol script result:
Error: file hwmon2/fan4_input+hwmon2/fan3_input+hwmon2/fan1_input doesn't exist

At least one referenced file is missing. Either some required kernel
modules haven't been loaded, or your configuration file is outdated.
In the latter case, you should run pwmconfig again.
  ***

This is because the fancontrol script breaks the "Controls" apart based on the 
'+', however
it does not affect the entire string, only the first '+' `sed 's/+/ /'` <-note 
the missing g.

I've included a patch to fix this issue.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64
 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages fancontrol depends on:
ii  init-system-helpers  1.48
ii  lsb-base             9.20161125

fancontrol recommends no packages.

fancontrol suggests no packages.

-- no debconf information
--- /usr/sbin/fancontrol        2017-04-05 16:07:33.000000000 -0400
+++ /usr/sbin/fancontrol        2017-05-11 10:17:29.215524165 -0400
@@ -298,7 +298,7 @@
        while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs
        do
                # A given PWM output can control several fans
-               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /')
+               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /g')
                do
                        if [ ! -r $fan ]
                        then
@@ -501,7 +501,7 @@
                        min_fanval=100000
                        fanval=
                        # A given PWM output can control several fans
-                       for one_fan in $(echo $fan | sed -e 's/+/ /')
+                       for one_fan in $(echo $fan | sed -e 's/+/ /g')
                        do
                                read one_fanval < ${one_fan}
                                if [ $? -ne 0 ]
--- /usr/sbin/fancontrol        2017-04-05 16:07:33.000000000 -0400
+++ /usr/sbin/fancontrol        2017-05-11 10:17:29.215524165 -0400
@@ -298,7 +298,7 @@
        while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs
        do
                # A given PWM output can control several fans
-               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /')
+               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /g')
                do
                        if [ ! -r $fan ]
                        then
@@ -501,7 +501,7 @@
                        min_fanval=100000
                        fanval=
                        # A given PWM output can control several fans
-                       for one_fan in $(echo $fan | sed -e 's/+/ /')
+                       for one_fan in $(echo $fan | sed -e 's/+/ /g')
                        do
                                read one_fanval < ${one_fan}
                                if [ $? -ne 0 ]
--- /usr/sbin/fancontrol        2017-04-05 16:07:33.000000000 -0400
+++ /usr/sbin/fancontrol        2017-05-11 10:17:29.215524165 -0400
@@ -298,7 +298,7 @@
        while (( $fcvcount < ${#AFCFAN[@]} )) # go through all fan inputs
        do
                # A given PWM output can control several fans
-               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /')
+               for fan in $(echo ${AFCFAN[$fcvcount]} | sed -e 's/+/ /g')
                do
                        if [ ! -r $fan ]
                        then
@@ -501,7 +501,7 @@
                        min_fanval=100000
                        fanval=
                        # A given PWM output can control several fans
-                       for one_fan in $(echo $fan | sed -e 's/+/ /')
+                       for one_fan in $(echo $fan | sed -e 's/+/ /g')
                        do
                                read one_fanval < ${one_fan}
                                if [ $? -ne 0 ]

Reply via email to