Line 403... |
Line 403... |
403 |
private function _distro()
|
403 |
private function _distro()
|
404 |
{
|
404 |
{
|
405 |
if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
|
405 |
if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
|
406 |
$this->sys->setDistribution(trim($buf));
|
406 |
$this->sys->setDistribution(trim($buf));
|
407 |
$list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);
|
407 |
$list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);
|
408 |
if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^Open\s+/', 'Open', preg_replace('/^Oracle\s+/', 'Oracle', trim($buf))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' SunOS'))]['Image'])) {
|
408 |
if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^open\s+/', 'open', preg_replace('/^oracle\s+/', 'oracle', strtolower(trim($buf)))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' sunos'))]['Image'])) {
|
409 |
$this->sys->setDistributionIcon($list[$distid]['Image']);
|
409 |
$this->sys->setDistributionIcon($list[$distid]['Image']);
|
410 |
if (isset($list[trim($distid)]['Name'])) {
|
410 |
if (isset($list[trim($distid)]['Name'])) {
|
411 |
$this->sys->setDistribution(trim($list[$distid]['Name']).' '.$this->sys->getDistribution());
|
411 |
$this->sys->setDistribution(trim($list[$distid]['Name']).' '.$this->sys->getDistribution());
|
412 |
}
|
412 |
}
|
413 |
} else {
|
413 |
} else {
|