# better be a decimal number
$advance =~ m/^\d+$/ or die "$advance ?";
+# Get a list of all filesystems
+readfsys('all');
+openlog();
+
# Rewind the tape and if we are the first incremental on the tape then
# write the TAPEID record, otherwise skip forward to the correct point.
# (full will already have checked that this is the right tape before
# it invoked us, so no need to read the existing TAPEID record first.)
-system "mt -f $ntape rewind"; $? and die $?;
+runsystem("mt -f $ntape rewind");
if ($advance == 1) {
writetapeid($tapeid,$tapedesc);
} else {
- system "mt -f $ntape fsf $advance"; $? and die $?;
- $currenttapefilenumber= $advance+1;
+ runsystem("mt -f $ntape fsf $advance");
+ $currenttapefilenumber= $advance;
}
-# Get a list of all filesystems
-readfsys('all');
-openlog();
-
sub closepipes () {
close(DUMPOR); close(BUFOR);
close(DUMPOW); close(BUFOW);
+ close(GZOR); close(GZOW);
}
setstatus "PROBLEMS during incremental dump";
}
# Rewind the tape, and increment the counter of incremental backups.
-system "mt -f $tape rewind"; $? and die $?;
+runsystem("mt -f $tape rewind");
open IAN,">increm-advance.new" or die $!;
print IAN "$advance\n" or die $!;
close IAN or die $!;