this will avoid matching '500' as '50' to $number and '0' to $type
* http://stackoverflow.com/questions/11807115/php-convert-kb-mb-gb-tb-etc-to-bytes
*/
function byteConvert($input) {
- if (!preg_match('/^(?P<number>[\d.,]+)\s*(?P<type>\w+)$/', $input, $m)) {
+ if (!preg_match('/^(?P<number>[\d.,]+)\s*(?P<type>\w+B)$/i', $input, $m)) {
return $input;
}
Summary: Nagios plugin to check Elvis DAM status
Name: nagios-plugin-%{plugin}
Version: 0.1
-Release: 1
+Release: 2
License: GPL v2
Group: Networking
Source0: %{plugin}.php