]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/prepare-fake-autochanger.in
Tweak dir conf for migration to eliminate Allow Duplicates, which made test fail
[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
19 #case $2 in
20 #list|slots)
21 #   sleep 2
22 #   ;;
23 #*)
24 #   sleep 5
25 #   ;;
26 #esac
27 EOF
28
29 # turn on ach debug
30 touch $adir/log
31
32 # create 75 volumes
33 for i in `seq 1 75`; do
34    echo $i:vol$i >> $adir/barcodes
35    cp /dev/null $adir/slot$i
36 done
37
38 # make a cleaning tape
39 echo 76:CLN01 >> $adir/barcodes
40 cp /dev/null $adir/slot76
41
42 # keep other empty
43 for i in `seq 77 79`; do
44    echo $i:  >> $adir/barcodes
45 done