From f92768d3ee95b425c15a18c3aadd41411f1acd10 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 23 Dec 2010 14:40:06 -0800 Subject: [PATCH] Handle partitions with no RW volumes in check_afs_quotas Correctly handle partitions containing no read/write volumes in check_afs_quotas. Thanks, Daniel Scott. --- NEWS | 3 +++ check_afs_quotas | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c1139b1..78d320e 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ afs-monitor 2.2 (unreleased) data for the percent usage of each partition checked. Based on a patch by Breandan Dezendorf. + Correctly handle partitions containing no read/write volumes in + check_afs_quotas. Thanks, Daniel Scott. + The vos binary is installed in sbin by the Red Hat packages and the default upstream installation rules, so check in sbin as well as bin. Patch from Daniel Scott. Also fall back, for all AFS binaries, to diff --git a/check_afs_quotas b/check_afs_quotas index 4dd02f3..ee57889 100755 --- a/check_afs_quotas +++ b/check_afs_quotas @@ -106,7 +106,7 @@ sub serverinfo { $volume = $1; $results{$volume}{size} = $2; } elsif (/^\s+MaxQuota\s+(\d+) K\s*$/) { - $results{$volume}{quota} = $1; + $results{$volume}{quota} = $1 if defined $volume; } } return %results; -- 2.39.5