diff options
author | Antoine Beaupre <anarcat@koumbit.org> | 2009-09-24 11:16:05 -0400 |
---|---|---|
committer | Antoine Beaupre <anarcat@koumbit.org> | 2009-09-24 11:16:05 -0400 |
commit | de010623a8594900b9661db9c0dc8707a1e402fe (patch) | |
tree | 1234957556ad511ef2a23f484380e560d675614e /files | |
parent | 9df16ed173e45462f6b0a55d0267b31d5a3021f9 (diff) | |
download | puppet-backupninja-de010623a8594900b9661db9c0dc8707a1e402fe.tar.gz puppet-backupninja-de010623a8594900b9661db9c0dc8707a1e402fe.tar.bz2 |
fix vserver lookup script
Diffstat (limited to 'files')
-rwxr-xr-x | files/checkbackups.pl | 9 |
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") { |