1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
#!/bin/sh
make
if test q$TAPE = q ; then export TAPE=/dev/nst0 ; fi
case $TAPE in
/dev/nst0|/dev/st0) V=`scsi_vendor tape 1` ;;
/dev/nst1|/dev/st1) V=`scsi_vendor tape 2` ;;
esac
echo Tape vendor is $V
echo =======================
case $V in
HP) B=32 ;;
*) B=32 ;;
esac
X="--exclude=index*"
echo $B
echo $X
#===================1==========================================================
echo 'dds2tar-test 1>' make
make
#===================2==========================================================
echo ' '
echo 'dds2tar-test 2>' 'make of?'
if test ! -x ./dds2tar ; then exit 1 ; fi
#===================3==========================================================
echo ' '
echo 'dds2tar-test 3>' creating soft links
ln -sf ./dds2tar ./dds2index
ln -sf ./dds2tar ./mt-dds
#===================4==========================================================
echo ' '
echo 'dds2tar-test 4>' creating soft and hard links
ln -s dds2tar dds2tar-test-tape-link-soft
ln dds2tar dds2tar-test-tape-link-hard
#===================5==========================================================
echo ' '
echo 'dds2tar-test 5>' tar c .
tar c $X .
#===================6==========================================================
echo ' '
echo 'dds2tar-test 6>' tar -c --label dds2tar -b $B ... .
tar --label dds2tar --record-file index-of-tar $X -R -v -c -b $B .
I=`grep 'number of the file' index-of-tar | cut -c 38-43`
if test q"$I" = q ; then I=1 ; fi
if test $I = 0 ; then exit 1 ; fi
I=`expr $I - 1`
echo file number of the archive written is $I
if test "$I" = "" ; then exit 1 ; fi
#===================7==========================================================
echo ' '
echo 'dds2tar-test 7>' tar -c . ...
tar --record-file index-of-tar-v -v -R -v -c -b $B $X .
#===================8==========================================================
echo ' '
echo 'dds2tar-test 8>' mt rewind \; mt fsf $I
mt rewind ; mt fsf $I
#===================9==========================================================
echo ' '
echo 'dds2tar-test 9>' mt-dds tell
./mt-dds tell
#==================10==========================================================
echo ' '
echo 'dds2tar-test 10>' mt-dds label
./mt-dds label
#==================11==========================================================
echo ' '
echo 'dds2tar-test 11>' mt-dds
./mt-dds
#==================12==========================================================
echo ' '
echo 'dds2tar-test 12>' dds2index
./dds2index -t index-of-dds2index
#==================13==========================================================
echo ' '
echo 'dds2tar-test 13>' find '*tape*' using index-of-tar
./dds2tar -t index-of-tar '*tape*' | tar fvt -
#==================14==========================================================
echo ' '
echo 'dds2tar-test 14>' find '*tape*' using index-of-tar-v
./dds2tar -t index-of-tar-v '*tape*' | tar fvt -
#==================15==========================================================
echo ' '
echo 'dds2tar-test 15>' find '*tape*' using index-of-dds2index
./dds2tar -t index-of-dds2index '*tape*' | tar vft -
#==================16==========================================================
echo ' '
echo 'dds2tar-test 16>' dds2tar -t index-of-tar --body Changes '|wc -c'
./dds2tar -t index-of-tar --body Changes | wc -c
ls -l Changes
#==================17==========================================================
echo 'dds2tar-test 17>' mt rewind \; mt fsf $I
mt rewind ; mt fsf $I
#==================18==========================================================
echo ' '
echo 'dds2tar-test 18>mt-dds'
mt-dds
#==================19==========================================================
echo ' '
echo 'dds2tar-test 19> mt-dds tell >'index-of-tar-t
mt-dds tell >index-of-tar-t
#==================20==========================================================
echo ' '
echo 'dds2tar-test 20> tar tR >>' index-of-tar-t
tar tR >> index-of-tar-t
#==================21==========================================================
echo ' '
echo 'dds2tar-test 21>' grep -v "'loc '" '< index-of-tar-t > index-of-tar-t2'
grep -v 'loc ' < index-of-tar-t > index-of-tar-t2
#==================22==========================================================
echo 'dds2tar-test 22>' mt rewind \; mt fsf $I
mt rewind ; mt fsf $I
#==================23==========================================================
echo 'dds2tar-test 23>' find '*tape*' using index-of-tar-t2 and mt-dds
echo 'dda2tar-test 23>' ./dds2tar '`mt-dds`' -t index-of-tar-t2 "'*tape*' | tar bvft 1 -"
./dds2tar `mt-dds` -v -t index-of-tar-t2 '*tape*' | tar bvft 1 -
#==================24==========================================================
echo 'dds2tar-test 24>' mt rewind \; mt fsf $I
mt rewind ; mt fsf $I
#==================25==========================================================
echo 'dds2tar-test 25>' removing links
/bin/rm dds2tar-test-tape-link-soft
/bin/rm dds2tar-test-tape-link-hard
|