]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup-tape.in
Tweak tape handling
[bacula/bacula] / regress / scripts / cleanup-tape.in
1 #!/bin/sh
2 #
3 # Cleanup left over files -- both before and after test run
4 #
5 rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
6 rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume*
7 rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out
8
9 #
10 # If we have an autochanger always load tape in slot 1
11 #
12 if ! test x@autochanger@ = x/dev/null; then
13    drive=`bin/mtx-changer @autochanger@ loaded`
14    if ! test x$drive = x1; then
15       bin/mtx-changer @autochanger@ unload
16       bin/mtx-changer @autochanger@ load 1
17    fi
18 fi
19
20 mt -f @tape_drive@ rewind
21 mt -f @tape_drive@ weof