wok-next annotate lm-sensors/stuff/patches/lm_sensors-fancontrol.patch @ rev 20018
Add libxkbcommon-wayland, screengrab, wayland-protocols; up compton, dbus, libdbusmenu-qt, libstatgrab, libxkbcommon, lm-sensors, lxterminal, menu-cache, qjson, qlipper, qps, upower, xdg-user-dirs.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Oct 22 04:01:51 2017 +0300 (2017-10-22) |
parents | |
children |
rev | line source |
---|---|
al@20018 | 1 --- a/prog/pwm/fancontrol 2012-11-07 03:26:37.000000000 +0200 |
al@20018 | 2 +++ b/prog/pwm/fancontrol 2013-03-22 18:15:00.566696011 +0200 |
al@20018 | 3 @@ -297,7 +297,7 @@ |
al@20018 | 4 cd $DIR |
al@20018 | 5 |
al@20018 | 6 # Check for configuration change |
al@20018 | 7 -if [ "$DIR" != "/" ] && [ -z "$DEVPATH" -o -z "$DEVNAME" ] |
al@20018 | 8 +if [[ "$DIR" != "/" && ( -z "$DEVPATH" || -z "$DEVNAME" ) ]] |
al@20018 | 9 then |
al@20018 | 10 echo "Configuration is too old, please run pwmconfig again" >&2 |
al@20018 | 11 exit 1 |
al@20018 | 12 @@ -337,7 +337,7 @@ |
al@20018 | 13 # It didn't work, try pwmN_enable=1 pwmN=255 |
al@20018 | 14 echo 1 > $ENABLE 2> /dev/null |
al@20018 | 15 echo $MAX > $1 |
al@20018 | 16 - if [ `cat $ENABLE` -eq 1 -a `cat $1` -ge 190 ] |
al@20018 | 17 + if [ `cat $ENABLE` -eq 1 ] && [ `cat $1` -ge 190 ] |
al@20018 | 18 then |
al@20018 | 19 # Success |
al@20018 | 20 return 0 |
al@20018 | 21 @@ -469,7 +469,7 @@ |
al@20018 | 22 else |
al@20018 | 23 # calculate the new value from temperature and settings |
al@20018 | 24 pwmval="(${tval}-${mint})*(${maxpwm}-${minso})/(${maxt}-${mint})+${minso}" |
al@20018 | 25 - if [ $pwmpval -eq 0 -o $min_fanval -eq 0 ] |
al@20018 | 26 + if [ $pwmpval -eq 0 ] || [ $min_fanval -eq 0 ] |
al@20018 | 27 then # if fan was stopped start it using a safe value |
al@20018 | 28 echo $minsa > $pwmo |
al@20018 | 29 # Sleep while still handling signals |