aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAntoine Beaupre <anarcat@koumbit.org>2009-09-24 11:16:05 -0400
committerAntoine Beaupre <anarcat@koumbit.org>2009-09-24 11:16:05 -0400
commitde010623a8594900b9661db9c0dc8707a1e402fe (patch)
tree1234957556ad511ef2a23f484380e560d675614e /files
parent9df16ed173e45462f6b0a55d0267b31d5a3021f9 (diff)
downloadpuppet-backupninja-de010623a8594900b9661db9c0dc8707a1e402fe.tar.gz
puppet-backupninja-de010623a8594900b9661db9c0dc8707a1e402fe.tar.bz2
fix vserver lookup script
Diffstat (limited to 'files')
-rwxr-xr-xfiles/checkbackups.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/files/checkbackups.pl b/files/checkbackups.pl
index be6bf70..80fc07f 100755
--- a/files/checkbackups.pl
+++ b/files/checkbackups.pl
@@ -103,10 +103,13 @@ foreach $host (@hosts) {
}
close(FLAG);
foreach my $vserver_dir (@vserver_dirs) {
- $dir = "$dir/rdiff-backup$vserver_dir";
- if (opendir(DIR, $dir)) {
- @vservers = grep { /^[^\.]/ && -d "$dir/$_" } readdir(DIR);
+ $vsdir = "$dir/rdiff-backup$vserver_dir";
+ if (opendir(DIR, $vsdir)) {
+ @vservers = grep { /^[^\.]/ && -d "$vsdir/$_" } readdir(DIR);
+ $opt_v && print STDERR "found vservers $vsdir: @vservers\n";
closedir DIR;
+ } else {
+ $opt_v && print STDERR "no vserver in $vsdir\n";
}
}
} elsif (-d "$dir/dump") {