summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/system.php15
1 files changed, 3 insertions, 12 deletions
diff --git a/libs/system.php b/libs/system.php
index b814432..62ca9cc 100644
--- a/libs/system.php
+++ b/libs/system.php
@@ -7,20 +7,11 @@ $hostname = php_uname('n');
// OS
if (!($os = shell_exec('/usr/bin/lsb_release -ds')))
{
- if (!($os = shell_exec('cat /etc/fedora-release')))
+ if(!($os = shell_exec('cat /etc/system-release')))
{
- if (!($os = shell_exec('cat /etc/redhat-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('cat /etc/mandriva-release')))
- {
- if (!($os = shell_exec('cat /etc/SuSE-release')))
- {
- if (!($os = shell_exec('cat /etc/centos-release')))
- {
- $os = 'N.A';
- }
- }
- }
+ $os = 'N.A';
}
}
}