Merge pull request #55 from HBadertscher/disk_ignore_mount

Adds option to ignore mounts via config file
This commit is contained in:
shevabam 2017-11-02 18:23:14 +01:00 committed by GitHub
commit f6dc271839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,8 @@
},
"disk": {
"show_tmpfs": false,
"show_filesystem": true
"show_filesystem": true,
"ignore_mounts": []
},
"ping": {
"hosts": [

View File

@ -32,6 +32,12 @@ else
if (strpos($type, 'tmpfs') !== false && $Config->get('disk:show_tmpfs') === false)
continue;
foreach ($Config->get('disk:ignore_mounts') as $to_ignore)
{
if ($mount === $to_ignore)
continue 2;
}
if (!in_array($mount, $mounted_points))
{
$mounted_points[] = trim($mount);