From: Georg Sluyterman Date: Thu, 10 Jan 2013 03:40:43 +0000 (-0800) Subject: Fix check_afs_quotas parsing when no volume was given X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=878056a2858763a04d276168e2fae4be16d2ed41;p=packages%2Fa%2Fafs-monitor.git Fix check_afs_quotas parsing when no volume was given The code to parse the output from vos listvol didn't work properly in the presence of read-only or backup volumes on the partition. --- diff --git a/check_afs_quotas b/check_afs_quotas index d3de92d..89255f0 100755 --- a/check_afs_quotas +++ b/check_afs_quotas @@ -103,9 +103,9 @@ sub serverinfo { my ($volume, %results); local $_; while () { - if (/^(\S+)\s+\d+ RW\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} = $2; + $results{$volume}{size} = $3; } elsif (/^\s+MaxQuota\s+(\d+) K\s*$/) { $results{$volume}{quota} = $1 if defined $volume; }