Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkesselb <mail@danielkesselberg.de>2020-04-04 22:58:12 +0300
committerGitHub <noreply@github.com>2020-04-04 22:58:12 +0300
commitf8dc19ad4f57ac8668e91eba2220c11833c3ab82 (patch)
treef35d1008eb38fdb9b4f0a27f5216bc15efde14e1
parent15551d9b1448d3dbaf1b7e5dd9811cbc7636e281 (diff)
parent86ef546ffd38a2e164c67cbda2afe4e6d3d0e294 (diff)
Merge pull request #189 from nextcloud/backport/186/stable18v18.0.4RC2v18.0.4RC1v18.0.4
[stable18] Update DefaultOs.php
-rw-r--r--lib/OperatingSystems/DefaultOs.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/OperatingSystems/DefaultOs.php b/lib/OperatingSystems/DefaultOs.php
index 3581eae..04a2dfd 100644
--- a/lib/OperatingSystems/DefaultOs.php
+++ b/lib/OperatingSystems/DefaultOs.php
@@ -62,8 +62,8 @@ class DefaultOs {
* @return string
*/
public function getCPUName() {
- $cpu = shell_exec('cat /proc/cpuinfo | grep -i \'Model name\' | cut -f 2 -d ":" | awk \'{$1=$1}1\'');
- $cores = shell_exec('cat /proc/cpuinfo | grep -i \'cpu cores\' | cut -f 2 -d ":" | awk \'{$1=$1}1\'');
+ $cpu = shell_exec('cat /proc/cpuinfo | grep -i \'Model name\' | cut -f 2 -d ":" | awk \'{$1=$1}1\' | head -1');
+ $cores = shell_exec('cat /proc/cpuinfo | grep -i \'cpu cores\' | cut -f 2 -d ":" | awk \'{$1=$1}1\' | head -1');
if ($cores === 1) {
$cores = ' (' . $cores . ' core)';
} else {