Project

General

Profile

« Previous | Next » 

Revision 7ab1a0a3

Added by Renato Botelho almost 5 years ago

Fix thermal sensors on SG-5100

View differences:

src/usr/local/www/widgets/widgets/thermal_sensors.widget.php
20 20
 */
21 21

  
22 22
require_once("guiconfig.inc");
23
require_once("system.inc");
23 24

  
24 25

  
25 26
//=========================================================================
26 27
//called by showThermalSensorsData() (jQuery Ajax call) in thermal_sensors.js
27 28
if (isset($_REQUEST["getThermalSensorsData"])) {
28 29

  
29
	$_gb = exec("/sbin/sysctl -aq | grep temperature", $dfout);
30
	$specplatform = system_identify_specific_platform();
31
	if ($specplatform['name'] == 'SG-5100') {
32
		$_gb = exec("/sbin/sysctl -q dev.cpu | grep temperature | sort",
33
		    $dfout);
34
	} else {
35
		$_gb = exec("/sbin/sysctl -aq | grep temperature", $dfout);
36
	}
30 37
	$dfout_filtered = array_filter($dfout, function($v) {
31 38
		return strpos($negsign, ' -') === false;
32 39
	});

Also available in: Unified diff