chiark / gitweb /
@@ -1,3 +1,11 @@
[chiark-utils.git] / backup / full
index 02b5b0c60d89b41ba85a068335cf1e59af39dd5f..0861537647647b6d3cbfdb450c8eee12d757cf4d 100755 (executable)
@@ -41,10 +41,8 @@ printdate();
 
 setstatus "FAILED reading TAPEID";
 # Try to read the tape ID from the tape into the file TAPEID
-unlink 'TAPEID';
-system "mt -f $tape rewind"; $? and die $?;
-system "mt -f $tape setblk $blocksizebytes"; $? and die $?;
-system "dd if=$tape bs=${blocksize}b count=10 | tar -b$blocksize -vvxf - TAPEID";
+
+readtapeid_raw();
 
 setstatus "FAILED during startup";
 
@@ -132,12 +130,8 @@ print LOG "$doing:\n" or die $!;
 
 setstatus "FAILED writing tape ID";
 # First write the tape ID to this tape.
-open T, ">TAPEID" or die $!;
-print T "$tapeid\n" or die $!;
-close T or die $!;
 
-system "tar -b$blocksize -vvcf TAPEID.tar TAPEID"; $? and die $?;
-system "dd if=TAPEID.tar of=$ntape bs=${blocksize}b count=10"; $? and die $?;
+writetapeid($tapeid);
 
 unlink 'this-md5sums';