ericpaulbishop / gargoyle

Gargoyle Router Management Utility
http://www.gargoyle-router.com
465 stars 222 forks source link

Fixed empty temperature display #988

Closed obsy closed 1 year ago

obsy commented 1 year ago

In some cases (ipq40xx), it fails to read the temperature and returns an empty value:

root@Gargoyle:~# /usr/lib/gargoyle/tempinfo.sh
temps.push("1","","-","-");

because:

root@Gargoyle:~# sh -x /usr/lib/gargoyle/tempinfo.sh
+ '[' -e /tmp/sysinfo/model ]
+ cat /tmp/sysinfo/model
+ tmodel='Cell C RTL30VW'
+ show_temp=1
+ TEMPCPU=-
+ TEMPMEM=-
+ TEMPWIFI=-
+ show_temp=0
+ '[' -e /sys/class/thermal/thermal_zone0/temp ]
+ '[' -e /sys/class/hwmon/hwmon0/temp1_input ]
+ cut -c1-2 /sys/class/hwmon/hwmon0/temp1_input
+ TEMPCPU=
+ show_temp=1
+ echo 'temps.push("1","","-","-");'
temps.push("1","","-","-");
+ exit 0

Fix this.

lantis1008 commented 1 year ago

Thanks for this. While Eric tags 1.14 I am just holding off merging to keep the branch stable so i don't get in his way. Will merge ASAP.

obsy commented 1 year ago

Ok. I'm also getting my 1.14 builds ready so there will be some test reports.