From 38b9af21994f18da072a789d87af2afdb9efc7c7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 27 Oct 2020 13:58:37 +0100 Subject: [statistics] Fix detection of machines with no HDD This was broken in two ways: The filters were renamed, but we still tried to match the old names (since these are strings :(), and then we need to ignore devicemapper devices reported on MaxiLinux. --- modules-available/statistics/pages/list.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules-available/statistics/pages/list.inc.php') diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index 9f2df897..96e8bea6 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -84,7 +84,7 @@ class SubPage $row['hostname'] = $row['clientip']; } if (isset($row['data'])) { - if (!preg_match('/^(Disk.* bytes|Disk.*\d{5,} sectors)/m', $row['data'])) { + if (!preg_match('#^Disk.* /dev/[^d].* (bytes$|sectors,)$#m', $row['data'])) { $row['nohdd'] = true; } } -- cgit v1.2.3-55-g7522