Subversion Repositories ALCASAR

Rev

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

Rev 2976 Rev 3037
Line 36... Line 36...
36
     * get all information from all configured ups and store output in internal array
36
     * get all information from all configured ups and store output in internal array
37
     */
37
     */
38
    public function __construct()
38
    public function __construct()
39
    {
39
    {
40
        parent::__construct();
40
        parent::__construct();
-
 
41
        if (defined('PSI_UPS_PMSET_ACCESS') && (strtolower(trim(PSI_UPS_PMSET_ACCESS))==='data')) {
-
 
42
            if (CommonFunctions::rftsdata('upspmset.tmp', $temp)) {
41
        if (PSI_OS == 'Darwin') {
43
                $this->_output[] = $temp;
42
            $temp = "";
44
            }
-
 
45
        } elseif (PSI_OS == 'Darwin') {
43
            if (CommonFunctions::executeProgram('pmset', '-g batt', $temp) && !empty($temp)) {
46
            if (CommonFunctions::executeProgram('pmset', '-g batt', $temp) && !empty($temp)) {
44
                $this->_output[] = $temp;
47
                $this->_output[] = $temp;
45
            }
48
            }
46
        }
49
        }
47
    }
50
    }
Line 87... Line 90...
87
    /**
90
    /**
88
     * get the information
91
     * get the information
89
     *
92
     *
90
     * @see PSI_Interface_UPS::build()
93
     * @see PSI_Interface_UPS::build()
91
     *
94
     *
92
     * @return Void
95
     * @return void
93
     */
96
     */
94
    public function build()
97
    public function build()
95
    {
98
    {
96
        $this->_info();
99
        $this->_info();
97
    }
100
    }