]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/prepare-two-tapes.in
ebl fix two-pool-tape for faketape
[bacula/bacula] / regress / scripts / prepare-two-tapes.in
1 #!/bin/sh
2 #
3 # Cleanup left over files -- both before and after test run
4 #
5
6 . scripts/functions
7
8 scripts/cleanup
9
10 if test x@autochanger@ != x/dev/null; then
11    slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
12    if test "x${slot}" != "x$SLOT2"; then
13       bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
14       bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
15    fi
16    init_drive @tape_drive@
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    slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
25    if test "x${slot}" != "x$SLOT1"; then
26       bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
27       bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
28    fi
29 fi
30
31 init_drive @tape_drive@
32