aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshevabam <shevabam@users.noreply.github.com>2017-11-02 18:23:14 +0100
committerGitHub <noreply@github.com>2017-11-02 18:23:14 +0100
commitf6dc27183987b65dc06c11dbfd21507da15f1ea7 (patch)
tree3d622ce73e2f60b9c0324222fa31f7324dbdde92
parent4142d5f19904c5f00bb11a9ba8746068a9169b4f (diff)
parent80b48185d36ec6f2f360ea35fd2592aec464084f (diff)
Merge pull request #55 from HBadertscher/disk_ignore_mount
Adds option to ignore mounts via config file
-rw-r--r--conf/esm.config.json3
-rw-r--r--libs/disk.php6
2 files changed, 8 insertions, 1 deletions
diff --git a/conf/esm.config.json b/conf/esm.config.json
index bf65386..e40b3ea 100644
--- a/conf/esm.config.json
+++ b/conf/esm.config.json
@@ -12,7 +12,8 @@
},
"disk": {
"show_tmpfs": false,
- "show_filesystem": true
+ "show_filesystem": true,
+ "ignore_mounts": []
},
"ping": {
"hosts": [
diff --git a/libs/disk.php b/libs/disk.php
index 6367114..d0be8b7 100644
--- a/libs/disk.php
+++ b/libs/disk.php
@@ -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);