]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup-2tape.in
Add new tape tests
[bacula/bacula] / regress / scripts / cleanup-2tape.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 if ! test x@autochanger@ = x/dev/null; then
10    drive=`bin/mtx-changer @autochanger@ loaded`
11    if ! test x$drive = x2; then
12       bin/mtx-changer @autochanger@ unload
13       bin/mtx-changer @autochanger@ load 2
14    fi
15    mt -f @tape_drive@ rewind
16    mt -f @tape_drive@ weof
17 fi
18
19
20 #
21 # If we have an autochanger always load tape in slot 1
22 #
23 if ! test x@autochanger@ = x/dev/null; then
24    drive=`bin/mtx-changer @autochanger@ loaded`
25    if ! test x$drive = x1; then
26       bin/mtx-changer @autochanger@ unload
27       bin/mtx-changer @autochanger@ load 1
28    fi
29 fi
30
31 mt -f @tape_drive@ rewind
32 mt -f @tape_drive@ weof