]> git.michaelhowe.org Git - packages/m/munin-plugins-afs.git/commitdiff
Initialize variables
authorMichael Howe <michael@michaelhowe.org>
Thu, 27 Dec 2018 14:51:20 +0000 (14:51 +0000)
committerMichael Howe <michael@michaelhowe.org>
Thu, 27 Dec 2018 14:51:20 +0000 (14:51 +0000)
If you have no volumes on a partition, its used size is effectively 0.

plugins/afs_volumes_partition_

index ea7c54c1e4212876993f7295f958a0c40586eb8c..95538c533d188dfefa5d9154bdfaf9e90c602ea2 100755 (executable)
@@ -72,6 +72,8 @@ sub serverinfo {
     }
 
     my( $volume, $size, %results );
+    $results{t}{size} = 0;
+    $results{t}{quota} = 0;
     while( my $line = <$lvol> ){
             if ($line =~ /^(\S+)\s+\d+ RW\s+(\d+) K\s+On-line\s*$/) {
                 ($volume, $size) = ($1, $2 * 1024);