From 878056a2858763a04d276168e2fae4be16d2ed41 Mon Sep 17 00:00:00 2001 From: Georg Sluyterman Date: Wed, 9 Jan 2013 19:40:43 -0800 Subject: [PATCH] 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. --- check_afs_quotas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5