Bug 827928 - /sbin/fancontrol: line 465: [: too many arguments [NEEDINFO]
/sbin/fancontrol: line 465: [: too many arguments
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lm_sensors (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaromír Cápík
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-03 16:39 EDT by Erik Logtenberg
Modified: 2016-01-31 20:56 EST (History)
6 users (show)

See Also:
Fixed In Version: lm_sensors-3.3.5-6.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-17 21:58:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jcapik: needinfo?


Attachments (Terms of Use)

  None (edit)
Description Erik Logtenberg 2012-06-03 16:39:43 EDT
Description of problem:

Fancontrol gives me the following error over and over:

/sbin/fancontrol: line 465: [: too many arguments

Version-Release number of selected component (if applicable):
$ rpm -qf /sbin/fancontrol 
lm_sensors-3.3.2-2.fc17.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start fancontrol
2. Observe given errors
  
Actual results:

Fancontrol seems to work okay even though it gives these errors. It doesn't crash and it still appears to manage the fanspeed.

Expected results:

Silent operation.

Additional info:

I checked line 465 and it's this:

463 # calculate the new value from temperature and settings
464 pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
465 if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ]

I noticed $pwmval contains an integer, varying roughly between 50 and 250 in my case. The $min_fanval variable though, is empty. I suspect that's not meant to be and is the cause of this error.
Why this variable is empty, I don't know.
Comment 1 Erik Logtenberg 2012-10-21 14:20:33 EDT
So... is any more information required? Is this the right place for this bug report?
Comment 2 Jaromír Cápík 2012-10-22 12:25:05 EDT
Hello Erik.

I became the new package owner/maintainer few weeks ago and I'll try to look at the issue asap.

Regards,
Jaromir.
Comment 3 Jaromír Cápík 2012-10-22 12:49:55 EDT
Could you please attach your /etc/fancontrol configuration file?

Thanks.

BR, J.
Comment 4 Erik Logtenberg 2012-10-23 08:52:04 EDT
Sure, no problem. This file was auto-generated by the way, I didn't edit it.

$ cat /etc/fancontrol
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/f71882fg.656
DEVNAME=hwmon0=coretemp hwmon1=f71889a
FCTEMPS=hwmon1/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon1/device/pwm1=
MINTEMP=hwmon1/device/pwm1=40
MAXTEMP=hwmon1/device/pwm1=60
MINSTART=hwmon1/device/pwm1=150
MINSTOP=hwmon1/device/pwm1=0
Comment 5 Jaromír Cápík 2012-10-23 09:07:16 EDT
Hi Erik.

Yes, that was my second question. I didn't ask in my previous comment, because I wanted to avoid an accidental file overwrite.

Now ... could You please try to regenerate the config and check for differences?

Thanks,
J.
Comment 6 Erik Logtenberg 2012-10-23 09:15:28 EDT
Okay, I stopped fancontrol, ran pwmconfig, saved the new config file and restarted fancontrol again.

I see no difference in the generated config file:

$ cat /etc/fancontrol 
# Configuration file generated by pwmconfig, changes will be lost
INTERVAL=10
DEVPATH=hwmon0=devices/platform/coretemp.0 hwmon1=devices/platform/f71882fg.656
DEVNAME=hwmon0=coretemp hwmon1=f71889a
FCTEMPS=hwmon1/device/pwm1=hwmon0/device/temp1_input
FCFANS=hwmon1/device/pwm1=
MINTEMP=hwmon1/device/pwm1=40
MAXTEMP=hwmon1/device/pwm1=60
MINSTART=hwmon1/device/pwm1=150
MINSTOP=hwmon1/device/pwm1=0

Well, at least it's consistent ;)

Would you like me to paste the console output of pwmconfig too? It's kind of lengthy...
Comment 7 Erik Logtenberg 2012-10-23 09:16:39 EDT
But just to be sure, pwmconfig did rewrite the config file, I checked the timestamp:

-rw-r--r--. 1 root root 398 Oct 23 15:13 /etc/fancontrol
Comment 8 Fedora End Of Life 2013-07-03 18:53:02 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Erik Logtenberg 2013-07-04 07:10:57 EDT
This bug is still open. It hasn't been fixed, and I'm still seeing this.
Comment 10 Fedora End Of Life 2013-12-21 03:37:52 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 11 Fedora End Of Life 2014-02-05 06:59:39 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 12 Jaromír Cápík 2014-03-17 13:25:42 EDT
Hello Erik.

Sorry for no response to your latest comments.
May I ask you to retest that in Fedora 20?

Thank you,
Jaromir.
Comment 13 Erik Logtenberg 2014-08-08 03:53:58 EDT
I'll retest soon. I only run fancontrol on one of my machines and that machine isn't running Fedora 20 yet. As soon as I've upgraded that machine I'll get back with the results.
Comment 14 aghoras 2015-04-12 12:04:26 EDT
near line 437 around:

else
    fanval=1  # set it to a non zero value, so the rest of the script still works
fi

add the line: min_fanval=1 to get:

else
    fanval=1  # set it to a non zero value, so the rest of the script still works
    min_fanval=1
fi
Comment 15 Erik Logtenberg 2015-04-13 07:05:59 EDT
Lol well it took almost 3 years and 4 major releases, but this does fix the bug.

It would be nice if this change could be incorporated in the fancontrol package.
Comment 16 Jaromír Cápík 2015-04-14 07:41:19 EDT
Thanks for the news, guys! Unfortunately I have no HW for testing the fancontrol on and therefore the troubleshooting is not easy. Anyway, the modification looks reasonable. I'm gonna ask my colleagues whether they could lend me their HW for a quick test so that I could feel more comfortable with committing the modification.
Comment 17 Jaromír Cápík 2015-07-14 11:34:55 EDT
I couldn't find a suitable HW, therefore committing as is.
Comment 18 Jaromír Cápík 2015-07-14 11:43:25 EDT
Guys, this has been redesigned in the upstream version 3.4.0. The 3.4.0 version is already in Rawhide. Could you please test the rawhide package and share results?

The RPMs can be obtained here:
http://koji.fedoraproject.org/koji/buildinfo?buildID=665239

Thanks in advance.
Comment 19 Fedora Update System 2015-07-14 12:08:01 EDT
lm_sensors-3.3.5-6.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/lm_sensors-3.3.5-6.fc21
Comment 20 Fedora Update System 2015-07-14 12:09:11 EDT
lm_sensors-3.3.5-6.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/lm_sensors-3.3.5-6.fc22
Comment 21 Jan Kurik 2015-07-15 11:07:46 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
Comment 22 Fedora Update System 2015-07-15 22:33:05 EDT
Package lm_sensors-3.3.5-6.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lm_sensors-3.3.5-6.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-11623/lm_sensors-3.3.5-6.fc22
then log in and leave karma (feedback).
Comment 23 Fedora Update System 2015-07-17 21:58:09 EDT
lm_sensors-3.3.5-6.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2015-07-30 09:53:48 EDT
lm_sensors-3.3.5-6.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.