fixed detection of best backup dir.
This commit is contained in:
parent
0b5aa8283b
commit
b699d9b65f
6
backup
6
backup
|
@ -35,7 +35,11 @@ my @backup_dirs = map {
|
|||
= statvfs($_);
|
||||
[ $_, $bsize * $bavail ]
|
||||
} glob("/backup/*/active");
|
||||
@backup_dirs = sort { $b->[1] <=> $b->[0] } @backup_dirs;
|
||||
@backup_dirs = sort { $b->[1] <=> $a->[1] } @backup_dirs;
|
||||
unless (@backup_dirs) {
|
||||
$ca->log(0, "no backup directory found");
|
||||
exit(1);
|
||||
}
|
||||
$ca->basedir($backup_dirs[0][0]);
|
||||
|
||||
$ca->run();
|
||||
|
|
Loading…
Reference in New Issue