From 027fc26a2ddd7dbc736a4ee8ffd5b8bbb3f5615d Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 20 Aug 2013 12:05:38 +0200 Subject: [PATCH] fixed the df output processing --- webui/model/health/health.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webui/model/health/health.php b/webui/model/health/health.php index 8b19ba33..d0314300 100644 --- a/webui/model/health/health.php +++ b/webui/model/health/health.php @@ -79,6 +79,7 @@ class ModelHealthHealth extends Model { public function diskinfo() { $shortinfo = array(); + $a = array(); $s = exec("df", $output); @@ -87,7 +88,9 @@ class ModelHealthHealth extends Model { while(list($k, $v) = each($output)) { if($k > 0) { $p = preg_split("/\ {1,}/", $v); - if(isset($p[5]) && in_array($p[5], $partitions)) { + if(isset($p[5]) && in_array($p[5], $partitions) && !isset($a[$p[5]])) { + $a[$p[5]] = 1; + $shortinfo[] = array( 'partition' => $p[5], 'freespace' => $p[3],