3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # This script will prepare a big dummy autochanger
13 adir=@working_dir@/ach
16 mkdir $adir 2> /dev/null
18 # work with $1 slots by default
21 # create the autochanger configuration file
22 cat > $adir/conf <<EOF
40 nb_vol=`expr $nb_slot - 5`
41 # create $nb_vol volumes
42 for i in `seq 1 $nb_vol`; do
43 echo $i:vol$i >> $adir/barcodes
44 cp /dev/null $adir/slot$i
47 # make a cleaning tape
48 cln_slot=`expr $nb_vol + 1`
49 echo $cln_slot:CLN01 >> $adir/barcodes
50 cp /dev/null $adir/slot$cnl_slot
53 next_empty=`expr $cnl_slot + 1`
54 for i in `seq $next_empty $nb_slot`; do
55 echo $i: >> $adir/barcodes