1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
|
|
3 |
use strict; |
use strict; |
4 |
#use lib "__INSTALLDIR__/lib"; |
use lib "__INSTALLDIR__/lib"; |
|
use lib "/data/backuppc-agi/lib"; |
|
5 |
|
|
6 |
use DBI; |
use DBI; |
7 |
use BackupPC::Lib; |
use BackupPC::Lib; |
322 |
|
|
323 |
foreach my $v (@volumes) { |
foreach my $v (@volumes) { |
324 |
|
|
325 |
print Dumper($v); |
#print Dumper($v); |
326 |
|
|
327 |
my $iso_size = 0; |
my $iso_size = 0; |
328 |
my $disk_name = $dvd_nr; |
my $disk_name = $dvd_nr; |
368 |
my $rel_path = $tar_file; |
my $rel_path = $tar_file; |
369 |
|
|
370 |
if (-d "$tar_dir/$rel_path") { |
if (-d "$tar_dir/$rel_path") { |
|
$rel_path .= '/' . $p->{part_nr}; |
|
371 |
mkpath("$stage/$rel_path") unless (-d "$stage/$rel_path"); |
mkpath("$stage/$rel_path") unless (-d "$stage/$rel_path"); |
372 |
|
$rel_path .= '/' . $p->{part_nr}; |
373 |
} |
} |
374 |
$rel_path .= '.tar.gz'; |
$rel_path .= '.tar.gz'; |
375 |
|
|
409 |
|
|
410 |
print "Created $iso_file [$iso_size bytes] in ", fmt_time(time() - $t), "\n"; |
print "Created $iso_file [$iso_size bytes] in ", fmt_time(time() - $t), "\n"; |
411 |
|
|
412 |
# FIXME |
rmtree($stage) || warn "can't remove stage directory $stage: $!"; |
|
#rmtree($stage) || warn "can't remove stage directory $stage: $!"; |
|
413 |
|
|
414 |
} else { |
} else { |
415 |
print "ISO $iso_file allready exists\n"; |
print "ISO $iso_file allready exists\n"; |