diff --git a/prog/pwm/fancontrol b/prog/pwm/fancontrol index 448b3d47..b6391f40 100755 --- a/prog/pwm/fancontrol +++ b/prog/pwm/fancontrol @@ -45,6 +45,8 @@ MAX=255 echo $$ > /var/run/fancontrol.pid +declare -i pwmval + function LoadConfig { echo "Loading configuration from $1 ..." # grep configuration from file @@ -324,7 +326,7 @@ function UpdateFanSpeeds { then pwmval=$maxpwm # over max temp, use defined max pwm else # calculate the new value from temperature and settings - let pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" + pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" if [ $pwmpval -eq 0 -o $fanval -eq 0 ] then # if fan was stopped start it using a safe value echo $minsa > $pwmo