summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Granger <hugues.granger@gmail.com>2014-11-10 16:37:10 +0100
committerHugues Granger <hugues.granger@gmail.com>2014-11-10 16:37:10 +0100
commit7e44ecbd4710e6eb9409daaded9064180ff9aefd (patch)
tree5c444b5b170ec7484450a5b3a4c950cc336b6727
parentb28e0b02756c4d5b84ca9040f04ef6c90fbf00db (diff)
Fix for RedHat/CentOS.
-rw-r--r--libs/system.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/system.php b/libs/system.php
index 1b0482e..62ca9cc 100644
--- a/libs/system.php
+++ b/libs/system.php
@@ -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';
+ }
}
}