#!/bin/sh # # Cleanup left over files -- both before and after test run # # Write an EOF on tape in slot $SLOT1 and on tape in $SLOT2 . scripts/functions scripts/cleanup # # init first of two slots # optimize so we don't unnecessarily unload and load slots # if test x@autochanger@ != x/dev/null; then slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1` case $slot in 0) bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1 init_drive @tape_drive@ slot=$SLOT1 ;; $SLOT1) init_drive @tape_drive@ slot=$SLOT1 ;; $SLOT2) init_drive @tape_drive@ slot=$SLOT2 ;; default) bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1 bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1 init_drive @tape_drive@ slot=$SLOT1 ;; esac # init the other slot case $slot in $SLOT1) bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1 bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1 init_drive @tape_drive@ ;; $SLOT2) bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1 bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1 init_drive @tape_drive@ ;; esac fi