From 3f6a49bae3ec616469f21dfbbbaff052055b0c0e Mon Sep 17 00:00:00 2001 From: ShevAbam Date: Wed, 18 Jun 2014 10:15:18 +0200 Subject: - System : fix to get the distro name - Services : fix on service names with accent - Services : ability to specify a host for each service - Network usage : fix to retrieve the name of the network interfaces - Memory : the cached and buffers memory are added to free memory now - Load Average : taking into account the number of cores - Disk usage : new option to hide tmpfs mountpoints - General : remove all PHP short tags --- libs/system.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libs/system.php') diff --git a/libs/system.php b/libs/system.php index 3e4ba1a..b814432 100644 --- a/libs/system.php +++ b/libs/system.php @@ -7,7 +7,22 @@ $hostname = php_uname('n'); // OS if (!($os = shell_exec('/usr/bin/lsb_release -ds'))) { - $os = 'N.A'; + if (!($os = shell_exec('cat /etc/fedora-release'))) + { + if (!($os = shell_exec('cat /etc/redhat-release'))) + { + 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'; + } + } + } + } + } } // Kernel -- cgit v1.3