Subversion Repositories ALCASAR

Rev

Rev 3037 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3037 Rev 3100
Line 26... Line 26...
26
     */
26
     */
27
    public function __construct()
27
    public function __construct()
28
    {
28
    {
29
        parent::__construct();
29
        parent::__construct();
30
        $lines = "";
30
        $lines = "";
31
        if (!defined('PSI_EMU_HOSTNAME')) switch (defined('PSI_SENSOR_IPMITOOL_ACCESS')?strtolower(PSI_SENSOR_IPMITOOL_ACCESS):'command') {
31
        if (!defined('PSI_EMU_HOSTNAME') || defined('PSI_EMU_PORT')) switch (defined('PSI_SENSOR_IPMITOOL_ACCESS')?strtolower(PSI_SENSOR_IPMITOOL_ACCESS):'command') {
32
        case 'command':
32
        case 'command':
33
            CommonFunctions::executeProgram('ipmitool', 'sensor -v', $lines);
33
            CommonFunctions::executeProgram('ipmitool', 'sensor -v', $lines);
34
            break;
34
            break;
35
        case 'data':
35
        case 'data':
-
 
36
            if (!defined('PSI_EMU_PORT')) {
36
            CommonFunctions::rftsdata('ipmitool.tmp', $lines);
37
                CommonFunctions::rftsdata('ipmitool.tmp', $lines);
-
 
38
            }
37
            break;
39
            break;
38
        default:
40
        default:
39
            $this->error->addConfigError('__construct()', '[sensor_ipmitool] ACCESS');
41
            $this->error->addConfigError('__construct()', '[sensor_ipmitool] ACCESS');
40
        }
42
        }
41
        if (trim($lines) !== "") {
43
        if (trim($lines) !== "") {