mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-01 13:20:30 +00:00
fancontrol: Executable commands as temp sensors.
This commit is contained in:
1 parent
42f240d2a4
commit
d6dced0503
2 files changed
+21
-5
No files matched your search
+18
-4
@@ -297,10 +297,19 @@ function CheckFiles
|
||||
while (( $fcvcount < ${#AFCTEMP[@]} )) # go through all temp inputs
|
||||
do
|
||||
tsen=${AFCTEMP[$fcvcount]}
|
||||
if [ ! -r $tsen ]
|
||||
if [ ${tsen::1} == "!" ]
|
||||
then
|
||||
echo "Error: file $tsen doesn't exist or isn't readable" >&2
|
||||
outdated=1
|
||||
if ! [ -x ${tsen:1} ]
|
||||
then
|
||||
echo "Error: file ${tsen:1} doesn't exist or isn't executable" >&2
|
||||
outdated=1
|
||||
fi
|
||||
else
|
||||
if ! [ -r $tsen ]
|
||||
then
|
||||
echo "Error: file $tsen doesn't exist or isn't readable" >&2
|
||||
outdated=1
|
||||
fi
|
||||
fi
|
||||
let fcvcount=$fcvcount+1
|
||||
done
|
||||
@@ -541,7 +550,12 @@ function UpdateFanSpeeds
|
||||
maxpwm=${AFCMAXPWM[$fcvcount]}
|
||||
avg=${AFCAVERAGE[$fcvcount]}
|
||||
|
||||
read tlastval < ${tsens}
|
||||
if [ ${tsens::1} == "!" ]
|
||||
then
|
||||
tlastval="$(${tsens:1})"
|
||||
else
|
||||
read tlastval < ${tsens}
|
||||
fi
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Error reading temperature from $DIR/$tsens"
|
||||
|
||||
@@ -49,7 +49,9 @@ the configuration file is still up-to-date.
|
||||
.B FCTEMPS
|
||||
Maps PWM outputs to temperature sensors so \fBfancontrol\fP knows which
|
||||
temperature sensors should be used for calculation of new values for
|
||||
the corresponding PWM outputs.
|
||||
the corresponding PWM outputs. A prefix of ! can be used to execute a
|
||||
command as a temperature sensor.
|
||||
|
||||
.TP
|
||||
.B FCFANS
|
||||
Records the association between a PWM output and a fan input.
|
||||
|
||||
Reference in new issue
Block a user