From 001de0f4aa9e48c7839790d8f95f73e0cc5688db Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Sun, 27 Dec 2009 08:12:21 +0000 Subject: [PATCH] updates git-svn-id: http://www.observium.org/svn/observer/trunk@557 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/storage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/discovery/storage.php b/includes/discovery/storage.php index dc77c36f11..2bb8f6be3f 100755 --- a/includes/discovery/storage.php +++ b/includes/discovery/storage.php @@ -16,13 +16,13 @@ list($descr, $units, $size, $fstype) = explode("\n", $temp); list($units) = explode(" ", $units); $allow = 1; - foreach($config['ignore_mount'] as $bi) { if($bi == $descr) { $allow = 0; } } - foreach($config['ignore_mount_string'] as $bi) { if(strpos($descr, $bi) !== FALSE) { $allow = 0; } } - foreach($config['ignore_mount_regexp'] as $bi) { if(preg_match($bi, $descr)) { $allow = 0; } } + foreach($config['ignore_mount'] as $bi) { if($bi == $descr) { $allow = 0; echo("$bi == $descr \n"); } } + foreach($config['ignore_mount_string'] as $bi) { if(strpos($descr, $bi) !== FALSE) { $allow = 0; echo("$descr, $bi \n"); } } + foreach($config['ignore_mount_regexp'] as $bi) { if(preg_match($bi, $descr)) { $allow = 0; echo("$bi, $descr \n"); } } $descr = str_replace("mounted on: ", "", $descr); $descr = str_replace(": var file system", "", $descr); - if((strstr($fstype, "FlashMemory") || strstr($fstype, "FixedDisk") || strstr($fstype, "Ram") || strstr($fstype, "VirtualMemory")) && $size > '0' && $allow) { + if($size > '0' && $allow) { if(mysql_result(mysql_query("SELECT count(storage_id) FROM `storage` WHERE hrStorageIndex = '$hrStorageIndex' AND host_id = '".$device['device_id']."'"),0) == '0') { $query = "INSERT INTO storage (`host_id`, `hrStorageIndex`, `hrStorageType`, `hrStorageDescr`,`hrStorageSize`,`hrStorageAllocationUnits`) "; $query .= "values ('".$device['device_id']."', '$hrStorageIndex', '$fstype', '$descr', '$size', '$units')";