Update pwmconfig

If sensor doesn't return any value (in my case it happen when fan got broken - look below) whole script gets messed up. "cut" latter in the script assume there are more values in $GOODFAN then there are really and "cut -d' ' -f$count" doesn't return proper value.

root@yaro-desktop2:/sys/class/hwmon# cat hwmon0/fan1_input 
cat: hwmon0/fan1_input: Bad argument
root@yaro-desktop2:/sys/class/hwmon#
This commit is contained in:
Sir_Yaro authored and GitHub committed 2020-12-30 20:33:26 +01:00
1 parent 4ea3cfe698
commit a8d4d1eaef
1 file changed
+1 -1
+1 -1
View File
@@ -284,7 +284,7 @@ echo 'Found the following fan sensors:'
for i in $FAN
do
S=$(cat $i)
if [ "$S" = "0" -o "$S" = "-1" ]
if [ "$S" = "0" -o "$S" = "-1" -o "$S" = "" ]
then
echo " $i current speed: 0 ... skipping!"
else