From c80bcade864ea98f1a41b19c163ccf1f2a0a49e2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 11 May 2021 14:39:46 +0200 Subject: [systemstatus] Fix displaying VM store usage if using internal storage --- modules-available/systemstatus/inc/systemstatus.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules-available/systemstatus/inc/systemstatus.inc.php b/modules-available/systemstatus/inc/systemstatus.inc.php index 4413af5f..f6d18801 100644 --- a/modules-available/systemstatus/inc/systemstatus.inc.php +++ b/modules-available/systemstatus/inc/systemstatus.inc.php @@ -23,17 +23,18 @@ class SystemStatus if (!isset($task['data']['list']) || empty($task['data']['list'])) return false; $wantedSource = Property::getVmStoreUrl(); - $currentSource = false; $storeUsage = false; $systemUsage = false; if ($wantedSource === '') { $storePoint = '/'; + $currentSource = $wantedSource; } else { $storePoint = CONFIG_VMSTORE_DIR; + $currentSource = false; } // Collect free space information foreach ($task['data']['list'] as $entry) { - // StorePoint is either the atual directory of the vmstore, or / if we use internal storage + // StorePoint is either the actual directory of the vmstore, or / if we use internal storage if ($entry['mountPoint'] === $storePoint) { $storeUsage = $entry; } @@ -42,8 +43,7 @@ class SystemStatus $systemUsage = $entry; } // Record what's mounted at destination, regardless of config, to indicate something is wrong - if (($currentSource === false && $wantedSource === '' && $entry['mountPoint'] === '/') - || $entry['mountPoint'] === CONFIG_VMSTORE_DIR) { + if ($entry['mountPoint'] === CONFIG_VMSTORE_DIR) { $currentSource = $entry['fileSystem']; } } -- cgit v1.2.3-55-g7522