Public bug reported:
Found in fancontrol 1:3.3.4-2ubuntu1 (fancontrol script Version 0.70,
also exists in Version 0.71).
If the config file has an INTERVAL that's NOT an integer (found with
INTERVAL=0.25) then bash's [ ] test (currently on line 77: if [
"$INTERVAL" -le 0 ] ) will fail (since -le expects integers) and output
an error message, but fancontrol continues.
Fancontrol seems to work correctly with a non-integer positive INTERVAL,
since "GNU `sleep' accepts arbitrary floating point numbers."
If INTERVAL is a negative non-integer (like -0.5) then the test for
negative numbers will fail, fancontrol will NOT exit, but sleep will
fail/crash. Fancontrol will still run, but with no sleep, using much
more CPU resources/time.
Output of fancontrol with INTERVAL=0.25
Loading configuration from /etc/fancontrol ...
/usr/sbin/fancontrol: line 77: [: 0.25: integer expression expected
Common settings:
INTERVAL=0.25
Settings for hwmon2/device/pwm3:
Depends on hwmon2/device/temp2_input
Controls hwmon2/device/fan3_input
MINTEMP=30
MAXTEMP=45
MINSTART=150
MINSTOP=70
MINPWM=70
MAXPWM=175
Settings for hwmon2/device/pwm1:
Depends on hwmon1/device/temp1_input
Controls hwmon2/device/fan1_input
MINTEMP=5
MAXTEMP=25
MINSTART=110
MINSTOP=110
MINPWM=110
MAXPWM=255
Enabling PWM on fans...
Starting automatic fan control...
Output if INTERVAL=-1.5
Loading configuration from /etc/fancontrol ...
/usr/sbin/fancontrol: line 77: [: -1.5: integer expression expected
Common settings:
INTERVAL=-1.5
Settings for hwmon2/device/pwm3:
Depends on hwmon2/device/temp2_input
Controls hwmon2/device/fan3_input
MINTEMP=30
MAXTEMP=45
MINSTART=150
MINSTOP=70
MINPWM=70
MAXPWM=175
Settings for hwmon2/device/pwm1:
Depends on hwmon1/device/temp1_input
Controls hwmon2/device/fan1_input
MINTEMP=5
MAXTEMP=25
MINSTART=110
MINSTOP=110
MINPWM=110
MAXPWM=255
Enabling PWM on fans...
Starting automatic fan control...
sleep: invalid option -- '1'
Try 'sleep --help' for more information.
sleep: invalid option -- '1'
Try 'sleep --help' for more information.
sleep: invalid option -- '1'
[sleep error repeats until fancontrol killed]
Originally found/tested in Linux Mint 17.2, package from the Ubuntu
(universe) repository, but it's a bash error so should exist on any
system fancontrol runs on.
** Affects: lm-sensors (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1572777
Title:
fancontrol Error message if INTERVAL not an integer, bug if INTERVAL a
negative non-integer
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lm-sensors/+bug/1572777/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs