# to be in $tf.
sub parsefsys () {
my ($dopts,$dopt);
- if ($tf =~ m,^(/\S*)\s+(\w+)([,0-9a-z]+)$,) {
+ if ($tf =~ m#^(/\S*)\s+(\w+)([,0-9a-z]+)$#) {
# Line of form '/file/system dumptype[,options]'
$atf= $1;
$tm= $2;
stat $atf or die "stat $atf: $!";
-d _ or die "not a dir: $atf";
$rstr= '';
- } elsif ($tf =~ m,^(/\S*)\s+(\w+)([,0-9a-z]+)\s+(\w+)$,) {
+ } elsif ($tf =~ m#^(/\S*)\s+(\w+)([,0-9a-z]+)\s+(\w+)$#) {
# Line of form '/file/system dumptype[,options] prefix'
# (used for remote backups)
$atf= $1;
$|=1;
+while (@ARGV) {
+ $_= shift @ARGV;
+ if (m/^\-\-no\-reten$/) {
+ $noreten=1;
+ } elsif (m/^\-\-no\-config\-check$/) {
+ $nocheck=1;
+ } else {
+ die "unknown option/argument \`$_'\n";
+ }
+}
+
# Check to see whether the tape.nn and fsys.nn files are sane.
# checkallused checks that all the filesystems mounted are in fact
# dumped in both full and incremental dumps.
-setstatus "FAILED configuration check";
-print "Configuration check ...\n" or die $!;
-system 'backup-checkallused'; $? and die $?;
+
+if (!$nocheck) {
+ setstatus "FAILED configuration check";
+ print "Configuration check ...\n" or die $!;
+ system 'backup-checkallused'; $? and die $?;
+} else {
+ setstatus "FAILED rewinding";
+ rewind_raw();
+}
printdate();
$doing= "dump of $fsys to tape $tapedesc in drive $tape";
print LOG "$doing:\n" or die $!;
-setstatus "FAILED retensioning";
-system "mt -f $tape reten"; $? and die $?;
+if (!$noreten) {
+ setstatus "FAILED retensioning";
+ system "mt -f $tape reten"; $? and die $?;
+}
setstatus "FAILED writing tape ID";
# First write the tape ID to this tape.
if ($gz) {
startprocess '<&TEEOR','>&GZOW','gzip -v$gz';
}
- startprocess '<&$bufir','>&BUFOW','writebuffer';
+ startprocess "<&$bufir",'>&BUFOW','writebuffer';
startprocess '<&BUFOR','>/dev/null'
,"dd ibs=$softblocksizebytes obs=$blocksizebytes of=$ntape";
closepipes();