Exemplo n.º 1
0
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (PTS_IS_CLIENT) {
    // Upon loading pts_client, make sure files are loaded
    pts_config::init_files();
}
class pts_config
{
    static $init_process_ran = false;
    static $xml_user_config = null;
    public static function get_config_file_location()
    {
        if (PTS_IS_DAEMONIZED_SERVER_PROCESS || is_file('/etc/phoronix-test-suite.xml') && is_writable('/etc/phoronix-test-suite.xml')) {
            return '/etc/phoronix-test-suite.xml';
        } else {
            return PTS_USER_PATH . 'user-config.xml';
        }
    }
    public static function init_files()
    {