]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/prepare-fake-autochanger.in
Add new maxruntime test -- not yet working
[bacula/bacula] / regress / scripts / prepare-fake-autochanger.in
1 #!/bin/sh
2 #
3 # This script will prepare a big dummy autochanger 
4 #
5
6 . scripts/functions
7
8 adir=@working_dir@/ach
9 rm -rf $adir
10
11 mkdir $adir 2> /dev/null
12
13 # create the autochanger configuration file
14 cat > $adir/conf <<EOF
15 maxdrive=8
16 maxslot=80
17 dbgfile=$adir/log
18 EOF
19
20 # turn on ach debug
21 touch $adir/log
22
23 # create 75 volumes
24 for i in `seq 1 75`; do
25    echo $i:vol$i >> $adir/barcodes
26    cp /dev/null $adir/slot$i
27 done
28
29 # make a cleaning tape
30 echo 76:CLN01 >> $adir/barcodes
31 cp /dev/null $adir/slot76
32
33 # keep other empty
34 for i in `seq 77 79`; do
35    echo $i:  >> $adir/barcodes
36 done