From b449f488b6e4da900069b90b92821e08347ebcc6 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 9 Jan 2013 19:42:59 -0800 Subject: [PATCH] Coding style and NEWS updates for check_afs_quotas fix --- NEWS | 5 +++++ check_afs_quotas | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 81aad38..aedab0b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,10 @@ User-Visible afs-monitor Changes +afs-monitor 2.3 (unreleased) + + Fix bug in check_afs_quotas when checking all volumes on a partition + that has read-only or backup volumes. + afs-monitor 2.2 (2011-03-03) Add a -d flag to check_afs_space that prints out Nagios performance diff --git a/check_afs_quotas b/check_afs_quotas index 89255f0..cb29d6f 100755 --- a/check_afs_quotas +++ b/check_afs_quotas @@ -11,7 +11,7 @@ our $VERSION = '@VERSION@ @DATE@'; # # Written by Russ Allbery # Based on a script by Steve Rader -# Copyright 2010 +# Copyright 2010, 2013 # The Board of Trustees of the Leland Stanford Junior University # # This program is free software; you may redistribute it and/or modify it @@ -103,9 +103,9 @@ sub serverinfo { my ($volume, %results); local $_; while () { - if (/^(\S+)\s+\d+ (RW|RO|BK)\s+(\d+) K\s+On-line\s*$/) { + if (/^(\S+)\s+\d+ (?:RW|RO|BK)\s+(\d+) K\s+On-line\s*$/) { $volume = $1; - $results{$volume}{size} = $3; + $results{$volume}{size} = $2; } elsif (/^\s+MaxQuota\s+(\d+) K\s*$/) { $results{$volume}{quota} = $1 if defined $volume; } -- 2.39.5