vmatare / thinkfan

The minimalist fan control program
GNU General Public License v3.0
552 stars 62 forks source link

Sytanx Error With Simple Configuration #28

Closed didasy closed 7 years ago

didasy commented 7 years ago

This is my /etc/thinkfan.conf:

hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input

(0,    0,    55)
(1,    48,    60)
(2,    50,    61)
(3,    52,    63)
(4,    56,    65)
(5,    59,    66)
(7,    63,    32767)

When I do sudo thinkfan -n it says

ERROR: /etc/thinkfan.conf:6: Invalid syntax:
(0,    0,    55)

Am I doing something wrong? The version I use is 0.99.0

vmatare commented 7 years ago

No, nothing wrong, just another bug in the parser. As a workaround, put some comment before the fan levels, i.e. like:

hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_input

# Useless comment line to work around parser bug

(0,    0,    55)
vmatare commented 7 years ago

To be honest, this is really not just a parser bug, but rather a design fault in the config syntax. High time I finished the YAML config I guess. Anyways, thanks for reporting, bugfix is coming up...

vmatare commented 7 years ago

If you want to help, please clone the current master from github and try it out. Should be fixed there. Make sure to remove the workaround-comment in case you did put that in your config.

didasy commented 7 years ago

@vmatare after I pull the latest commit, it works perfectly now. I guess yaml support would be great.