Beispiel #1
0
 public static function setUpBeforeClass()
 {
     $linfo = new Linfo();
     self::$parser = $linfo->getParser();
     self::assertInstanceOf('OS_Linux', self::$parser);
     self::$parser->determineCPUPercentage();
 }
 public function __construct(Linfo $linfo)
 {
     $settings = $linfo->getSettings();
     $this->LinfoError = LinfoError::Singleton();
     $this->connectionSettings = $settings['utorrent_connection'];
     $this->regexFilters = isset($settings['utorrent_filter']) && is_array($settings['utorrent_filter']) ? $settings['utorrent_filter'] : array();
     $this->hideName = isset($settings['utorrent_hide_name']) ? !empty($settings['utorrent_hide_name']) : false;
 }
 /**
  * localize important stuff
  * 
  * @access public
  */
 public function __construct(Linfo $linfo)
 {
     $settings = $linfo->getSettings();
     // Localize error handler
     $this->_LinfoError = LinfoError::Singleton();
     // Should we hide mac addresses, to prevent stuff like mac address spoofing?
     $this->_hide_mac = array_key_exists('dhcpd3_hide_mac', $settings) ? (bool) $settings['dhcpd3_hide_mac'] : false;
     // Find leases file
     $this->_leases_file = LinfoCommon::locateActualPath(array('/var/lib/dhcp/dhcpd.leases', '/var/lib/dhcp3/dhcpd.leases', '/var/lib/dhcpd/dhcpd.leases', '/var/state/dhcp/dhcpd.leases', '/var/db/dhcpd/dhcpd.leases', '/var/db/dhcpd.leases'));
 }
 /**
  * localize important stuff
  * 
  * @access public
  */
 public function __construct(Linfo $linfo)
 {
     $settings = $linfo->getSettings();
     // Classes we need
     $this->_CallExt = new CallExt();
     $this->_CallExt->setSearchPaths(array('/usr/bin', '/usr/local/bin'));
     $this->_LinfoError = LinfoError::Singleton();
     // Transmission specific settings
     $this->_auth = array_key_exists('transmission_auth', $settings) ? (array) $settings['transmission_auth'] : array();
     $this->_host = array_key_exists('transmission_host', $settings) ? (array) $settings['transmission_host'] : array();
     // Path to home dir folder
     $this->_folder = array_key_exists('transmission_folder', $settings) && is_dir($settings['transmission_folder']) && is_readable($settings['transmission_folder']) ? $settings['transmission_folder'] : false;
 }
 public static function setUpBeforeClass()
 {
     LinfoCommon::$path_prefix = dirname(dirname(__FILE__)) . '/../files/linux/generic_distro';
     $linfo = new Linfo();
     self::$parser = $linfo->getParser();
 }
 public function __construct(Linfo $linfo)
 {
     $settings = $linfo->getSettings();
     $this->LinfoError = LinfoError::Singleton();
     $this->connectionSettings = $settings['libvirt_connection'];
 }
Beispiel #7
0
include "../../../cli/startup.php";
chdir($workingDirectory);
// only for logged in users
$user = \Pimcore\Tool\Authentication::authenticateSession();
if (!$user instanceof User) {
    die("Authentication failed!");
}
if (!$user->isAdmin()) {
    die("Permission denied");
}
@ini_set("display_errors", "Off");
/*######### /PIMCORE MODIFICATION #########*/
// Load libs
require_once dirname(__FILE__) . '/init.php';
// Begin
try {
    // Load settings and language
    $linfo = new Linfo();
    // Run through /proc or wherever and build our list of settings
    $linfo->scan();
    // Give it off in html/json/whatever
    $linfo->output();
} catch (LinfoFatalException $e) {
    echo $e->getMessage() . "\n";
    exit(1);
}
// Developers:
// if you include init.php as above and instantiate a $linfo
// object, you can get an associative array of all of the
// system info with $linfo->getInfo() after running $linfo->scan();
// Just catch the LinfoFatalException for fatal errors
 public static function setUpBeforeClass()
 {
     $linfo = new Linfo();
     $linfo->scan();
     self::$output = new LinfoOutput($linfo);
 }
 public static function config(Linfo $linfo)
 {
     self::$settings = $linfo->getSettings();
     self::$lang = $linfo->getLang();
 }
Beispiel #10
0
 public static function setUpBeforeClass()
 {
     $linfo = new Linfo();
     self::$parser = $linfo->getParser();
     self::assertInstanceOf('OS_Darwin', self::$parser);
 }
 public function __construct(Linfo $linfo)
 {
     $settings = $linfo->getSettings();
     $this->_LinfoError = LinfoError::Singleton();
     $this->_servers = (array) $settings['soldat_servers'];
 }