wok-next view lm-sensors/stuff/patches/lm_sensors-fancontrol.patch @ rev 20859
Update ALSA stack (1.1.6)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jun 27 13:35:43 2018 +0300 (2018-06-27) |
parents | |
children |
line source
1 --- a/prog/pwm/fancontrol 2012-11-07 03:26:37.000000000 +0200
2 +++ b/prog/pwm/fancontrol 2013-03-22 18:15:00.566696011 +0200
3 @@ -297,7 +297,7 @@
4 cd $DIR
6 # Check for configuration change
7 -if [ "$DIR" != "/" ] && [ -z "$DEVPATH" -o -z "$DEVNAME" ]
8 +if [[ "$DIR" != "/" && ( -z "$DEVPATH" || -z "$DEVNAME" ) ]]
9 then
10 echo "Configuration is too old, please run pwmconfig again" >&2
11 exit 1
12 @@ -337,7 +337,7 @@
13 # It didn't work, try pwmN_enable=1 pwmN=255
14 echo 1 > $ENABLE 2> /dev/null
15 echo $MAX > $1
16 - if [ `cat $ENABLE` -eq 1 -a `cat $1` -ge 190 ]
17 + if [ `cat $ENABLE` -eq 1 ] && [ `cat $1` -ge 190 ]
18 then
19 # Success
20 return 0
21 @@ -469,7 +469,7 @@
22 else
23 # calculate the new value from temperature and settings
24 pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}"
25 - if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ]
26 + if [ $pwmpval -eq 0 ] || [ $min_fanval -eq 0 ]
27 then # if fan was stopped start it using a safe value
28 echo $minsa > $pwmo
29 # Sleep while still handling signals