]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/prepare-fake-autochanger.in
ebl rename faketape to vtape
[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 # check if user wants to run this test
9 if test x$USE_VTAPE = x; then
10     exit 1
11 fi
12
13 adir=@working_dir@/ach
14
15 mkdir $adir 2> /dev/null
16 rm -f $adir/log $adir/barcodes $adir/load* $adir/slot* $adir/drive* 2> /dev/null
17
18 # create the autochanger configuration file
19 cat > $adir/conf <<EOF
20 maxdrive=8
21 maxslot=80
22 dbgfile=$adir/log
23 EOF
24
25 # turn on ach debug
26 touch $adir/log
27
28 # create 75 volumes
29 for i in `seq 1 75`; do
30     echo $i:vol$i >> $adir/barcodes
31     cp /dev/null $adir/slot$i
32 done
33
34 # make a cleaning tape
35 echo 76:CLN01 >> $adir/barcodes
36 cp /dev/null $adir/slot76
37
38 # keep other empty
39 for i in `seq 77 79`; do
40     echo $i:  >> $adir/barcodes
41 done
42