]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/cleanup-2drive.in
regress: Try to implement registry test in regress-win32.pl
[bacula/bacula] / regress / scripts / cleanup-2drive.in
1 #!/bin/sh
2 #
3 # Cleanup left over files -- both before and after test run
4 #
5 . scripts/functions
6 scripts/cleanup
7
8 if test x@autochanger@ != x/dev/null; then
9    slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
10    echo "Slot $slot in drive 1"
11    if test x$slot != x0 ; then
12       echo "unload slot $slot in drive 1"
13       $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
14    fi
15    slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
16    echo "Slot $slot in drive 0"
17    if test x$slot != x0 ; then
18       echo "unload slot $slot in drive 0"
19       $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
20    fi
21
22
23    slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
24    if test x$slot != x$SLOT2; then
25       echo "load slot $SLOT2 in drive 1"
26       $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
27    fi
28    echo "WEOF drive 1"
29    init_drive @tape_drive1@
30
31    echo "unload slot $SLOT2 in drive 1"
32    $scripts/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
33
34    slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
35    echo "Slot $slot in drive 0"
36    if test x$slot != x$SLOT1; then
37       echo "load slot $SLOT1 in drive 0"
38       $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
39    fi
40    echo "WEOF drive 0"
41    init_drive @tape_drive@
42
43    echo "unload slot $SLOT1 from drive 0"
44    $scripts/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0
45 fi