3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Cleanup left over files -- both before and after test run
13 if test x@autochanger@ != x/dev/null; then
14 slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
15 echo "Slot $slot in drive 1"
16 if test x$slot != x0 ; then
17 echo "unload slot $slot in drive 1"
18 $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
20 slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
21 echo "Slot $slot in drive 0"
22 if test x$slot != x0 ; then
23 echo "unload slot $slot in drive 0"
24 $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
28 slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
29 if test x$slot != x$SLOT2; then
30 echo "load slot $SLOT2 in drive 1"
31 $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
34 init_drive @tape_drive1@
36 echo "unload slot $SLOT2 in drive 1"
37 $scripts/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
39 slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
40 echo "Slot $slot in drive 0"
41 if test x$slot != x$SLOT1; then
42 echo "load slot $SLOT1 in drive 0"
43 $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
46 init_drive @tape_drive@
48 echo "unload slot $SLOT1 from drive 0"
49 $scripts/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0