From: Eric Bollengier Date: Wed, 21 Apr 2010 14:46:22 +0000 (+0200) Subject: regress: add nb slots parameter to prepare-fake-autochanger script X-Git-Tag: Release-7.0.0~1896 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e4c828ecc06265a3d87fd9f0b6cd0e5285a25086;p=bacula%2Fbacula regress: add nb slots parameter to prepare-fake-autochanger script --- diff --git a/regress/scripts/prepare-fake-autochanger.in b/regress/scripts/prepare-fake-autochanger.in index 49fed29aaf..f272635142 100644 --- a/regress/scripts/prepare-fake-autochanger.in +++ b/regress/scripts/prepare-fake-autochanger.in @@ -10,10 +10,13 @@ rm -rf $adir mkdir $adir 2> /dev/null +# work with $1 slots by default +nb_slot=${1:-80} + # create the autochanger configuration file cat > $adir/conf <> $adir/barcodes cp /dev/null $adir/slot$i done # make a cleaning tape -echo 76:CLN01 >> $adir/barcodes -cp /dev/null $adir/slot76 +cln_slot=`expr $nb_vol + 1` +echo $cln_slot:CLN01 >> $adir/barcodes +cp /dev/null $adir/slot$cnl_slot # keep other empty -for i in `seq 77 79`; do +next_empty=`expr $cnl_slot + 1` +for i in `seq $next_empty $nb_slot`; do echo $i: >> $adir/barcodes done