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,9 +7,12 @@ $hostname = php_uname('n');
// OS
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';
}
}
}