mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
Merge pull request 'fancontrol, pwmconfig: Allow read-only pwm*_enable' (#344) from amezin/master into master
Note: strip superfluous parentheses
This commit is contained in:
commit
fb35c5b4fa
2 files changed
+5
-7
No files matched your search
+1
-1
@@ -548,7 +548,7 @@ function pwmenable()
|
||||
fi
|
||||
# enable manual control by fancontrol
|
||||
echo 1 > $ENABLE 2> /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
if [ "$(cat $ENABLE)" -ne 1 ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
|
||||
+4
-6
@@ -215,14 +215,12 @@ function pwmenable()
|
||||
{
|
||||
local ENABLE=${1}_enable
|
||||
|
||||
if [ -w $ENABLE ]
|
||||
echo 1 > $ENABLE 2>/dev/null
|
||||
if [ "$(cat $ENABLE)" -ne 1 ]
|
||||
then
|
||||
echo 1 2>/dev/null > $ENABLE
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo $MAX > $1
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user