Fix for RedHat/CentOS.

This commit is contained in:
Hugues Granger 2014-11-10 16:37:10 +01:00
parent b28e0b0275
commit 7e44ecbd47

View File

@ -7,10 +7,13 @@ $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('cat /etc/system-release')))
{
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('find /etc/*-release -type f -exec cat {} \; | grep NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\'')))
{ {
$os = 'N.A'; $os = 'N.A';
} }
}
} }
// Kernel // Kernel