1#!/bin/sh
2#
3# Cleanup left over files, then load $SLOT1 into drive and
4#   write an EOF on it.
5#
6
7. scripts/functions
8
9scripts/cleanup
10
11if test x@autochanger@ != x/dev/null; then
12   slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
13   case $slot in
14   0)
15      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
16      ;;
17   $SLOT1)
18      ;;
19   *)
20      $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
21      $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
22      ;;
23  esac
24fi
25
26init_drive @tape_drive@
27