From: Russ Allbery Date: Thu, 23 Dec 2010 22:40:06 +0000 (-0800) Subject: Handle partitions with no RW volumes in check_afs_quotas X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f92768d3ee95b425c15a18c3aadd41411f1acd10;p=packages%2Fa%2Fafs-monitor.git 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. --- 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;