]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup-2tape.in
fix bad script tests + add smtp_host + fix tape options
[bacula/bacula] / regress / scripts / cleanup-2tape.in
1 #!/bin/sh
2 #
3 # Cleanup left over files -- both before and after test run
4 #
5 scripts/cleanup
6
7 if test ! x@autochanger@ = x/dev/null; then
8    drive=`bin/mtx-changer @autochanger@ loaded`
9    if test ! x$drive = x2; then
10       bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
11       bin/mtx-changer @autochanger@ load 2 @tape_drive@ 0
12    fi
13    mt -f @tape_drive@ rewind
14    mt -f @tape_drive@ weof
15 fi
16
17
18 #
19 # If we have an autochanger always load tape in slot 1
20 #
21 if test ! x@autochanger@ = x/dev/null; then
22    drive=`bin/mtx-changer @autochanger@ loaded`
23    if test ! x$drive = x1; then
24       bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
25       bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
26    fi
27 fi
28
29 mt -f @tape_drive@ rewind
30 mt -f @tape_drive@ weof