FS#34187 - /usr/sbin/fancontrol error on line 472: too many arguments

Attached to Project: Arch Linux
Opened by David (10robinho) - Thursday, 07 March 2013, 01:12 GMT
Last edited by Eric Belanger (Snowman) - Thursday, 04 April 2013, 01:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

when I run /usr/sbin/fancontrol it apparently works, but every second it is outputing this:

/usr/sbin/fancontrol: line 472: [: too many arguments

and lines 472-478 are:

if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ]
then # if fan was stopped start it using a safe value
echo $minsa > $pwmo
# Sleep while still handling signals
sleep 1 &
wait $!
fi


Additional info:
extra/lm_sensors 3.3.3-1
This task depends upon

Closed by  Eric Belanger (Snowman)
Thursday, 04 April 2013, 01:06 GMT
Reason for closing:  Fixed
Comment by Andres Vabamäe (andy_v) - Friday, 22 March 2013, 17:28 GMT
I also noticed a flood of error messages related to fancontrol (and line 472) a while back when I ran journalctl. Apparently, the use of -a and -o arguments with the "[" command (or test) is strongly discouraged and one should either use multiple "["-s (a list) or, seeing as fancontrol is a bash script, use "[[" with &&/|| instead (see attached *.diffs).

Fancontrol itself works well on my system, in fact, I probably wouldn't have noticed those error messages if it weren't for a misbehaving app that I was trying to debug.
Comment by Eric Belanger (Snowman) - Friday, 22 March 2013, 21:26 GMT
Please try lm_sensors-3.3.3-2 in [testing] repo.
Comment by Andres Vabamäe (andy_v) - Saturday, 23 March 2013, 01:39 GMT
Hi, Eric! I installed lm_sensors-3.3.3-2 from [testing] and no longer experience the issue. Thank you for looking into it so quickly and cleaning up the package (regarding initscripts)!

Loading...