Fix for RedHat/CentOS.

This commit is contained in:
Hugues Granger 2014-11-10 16:37:10 +01:00
parent b28e0b0275
commit 7e44ecbd47
1 changed files with 5 additions and 2 deletions

View File

@ -7,9 +7,12 @@ $hostname = php_uname('n');
// OS // OS
if (!($os = shell_exec('/usr/bin/lsb_release -ds'))) if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
{ {
if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\''))) if(!($os = shell_exec('cat /etc/system-release')))
{ {
$os = 'N.A'; if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
{
$os = 'N.A';
}
} }
} }