]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup-2tape.in
ebl tweak base scripts to use faketape
[bacula/bacula] / regress / scripts / cleanup-2tape.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
17    init_drive @tape_drive@
18 fi
19
20
21 #
22 # If we have an autochanger always load tape in slot 1
23 #
24 if test x@autochanger@ != x/dev/null; then
25    slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
26    if test "x${slot}" != "x$SLOT1"; then
27       bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
28       bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
29    fi
30 fi
31
32 init_drive @tape_drive@
33