From 411308a50c3cbc923513c18f876bf88909bd7786 Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Fri, 9 Nov 2001 21:16:50 +0000 Subject: [PATCH] Fix error message; rewind after labelling. --- backup/backuplib.pl | 6 +++++- backup/labeltape | 3 ++- debian/changelog | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/backup/backuplib.pl b/backup/backuplib.pl index 8be8bff..e80f779 100644 --- a/backup/backuplib.pl +++ b/backup/backuplib.pl @@ -51,10 +51,14 @@ sub startprocess ($$$) { exec $c; die "$c: $!"; } +sub rewind_raw () { + system "mt -f $tape rewind"; $? and die $?; +} + sub readtapeid_raw () { open T, ">>TAPEID" or die $!; close T; unlink 'TAPEID' or die $!; - system "mt -f $tape rewind"; $? and die $?; + rewind_raw(); system "mt -f $tape setblk $blocksizebytes"; $? and die $?; system "dd if=$tape bs=${blocksize}b count=10 ". "| tar -b$blocksize -vvxf - TAPEID"; diff --git a/backup/labeltape b/backup/labeltape index 98961af..c06d897 100755 --- a/backup/labeltape +++ b/backup/labeltape @@ -19,7 +19,7 @@ while ($ARGV[0] =~ m/^-/) { } } -@ARGV==1 or die "$0: need 1 arg, new TAPEID"; +@ARGV==1 or die "$0: need 1 arg, new TAPEID\n"; ($newid)= @ARGV; readtapeid_raw(); @@ -38,6 +38,7 @@ print T "$newid\n" or die $!; close T or die $!; writetapeid($newid); +rewind_raw(); print "Labelled tape \`$newid'\n" or die $!; exit 0; diff --git a/debian/changelog b/debian/changelog index 3d7ad9c..ceb4472 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -chiark-utils (2.1.0) experimental; urgency=low +chiark-utils (2.0.0.999) experimental; urgency=low * man pages for readbuffer, writebuffer from Richard Kettlewell. * add info re last-tape and checkallused to iwjbackup.txt. * new `backup-labeltape' utility. - -- + -- Ian Jackson Fri, 9 Nov 2001 21:12:25 +0000 chiark-utils (2.0.0) experimental; urgency=low -- 2.30.2