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
10 # Write an EOF on tape in slot $SLOT1 and on tape in $SLOT2
17 # with disk-changer, we have to initialize slots
18 init_slot @tape_drive@ $SLOT1
19 init_slot @tape_drive@ $SLOT2
22 # init first of two slots
23 # optimize so we don't unnecessarily unload and load slots
25 if test x@autochanger@ != x/dev/null; then
26 slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
29 $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
39 $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
40 $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
44 init_drive @tape_drive@
45 $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
51 $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
54 $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
57 echo "Something went wrong. Expected $SLOT1 or $SLOT2, got $slot"
60 init_drive @tape_drive@