Line 25... |
Line 25... |
25 |
* fill the private content var through command or data access
|
25 |
* fill the private content var through command or data access
|
26 |
*/
|
26 |
*/
|
27 |
public function __construct()
|
27 |
public function __construct()
|
28 |
{
|
28 |
{
|
29 |
parent::__construct();
|
29 |
parent::__construct();
|
30 |
if (!defined('PSI_EMU_HOSTNAME')) switch (defined('PSI_SENSOR_IPMIUTIL_ACCESS')?strtolower(PSI_SENSOR_IPMIUTIL_ACCESS):'command') {
|
30 |
if (!defined('PSI_EMU_HOSTNAME') || defined('PSI_EMU_PORT')) switch (defined('PSI_SENSOR_IPMIUTIL_ACCESS')?strtolower(PSI_SENSOR_IPMIUTIL_ACCESS):'command') {
|
31 |
case 'command':
|
31 |
case 'command':
|
32 |
CommonFunctions::executeProgram('ipmiutil', 'sensor -stw', $lines);
|
32 |
CommonFunctions::executeProgram('ipmiutil', 'sensor -stw', $lines);
|
33 |
$this->_lines = preg_split("/\r?\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
33 |
$this->_lines = preg_split("/\r?\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
34 |
break;
|
34 |
break;
|
35 |
case 'data':
|
35 |
case 'data':
|
36 |
if (CommonFunctions::rftsdata('ipmiutil.tmp', $lines)) {
|
36 |
if (!defined('PSI_EMU_PORT') && CommonFunctions::rftsdata('ipmiutil.tmp', $lines)) {
|
37 |
$this->_lines = preg_split("/\r?\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
37 |
$this->_lines = preg_split("/\r?\n/", $lines, -1, PREG_SPLIT_NO_EMPTY);
|
38 |
}
|
38 |
}
|
39 |
break;
|
39 |
break;
|
40 |
default:
|
40 |
default:
|
41 |
$this->error->addConfigError('__construct()', '[sensor_ipmiutil] ACCESS');
|
41 |
$this->error->addConfigError('__construct()', '[sensor_ipmiutil] ACCESS');
|