]> git.sur5r.net Git - bacula/bacula/commitdiff
Nothing
authorKern Sibbald <kern@sibbald.com>
Thu, 19 Jun 2008 10:50:35 +0000 (10:50 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 19 Jun 2008 10:50:35 +0000 (10:50 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7171 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/prepare-fake-autochanger [new file with mode: 0755]

diff --git a/regress/scripts/prepare-fake-autochanger b/regress/scripts/prepare-fake-autochanger
new file mode 100755 (executable)
index 0000000..dba8ef4
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# This script will prepare a big dummy autochanger 
+#
+
+. scripts/functions
+
+# check if user wants to run this test
+if test x$USE_FAKETAPE = x; then
+    exit 1
+fi
+
+adir=/home/kern/bacula/Branch-2.4/regress/working/ach
+
+mkdir $adir 2> /dev/null
+rm -f $adir/log $adir/barcodes $adir/load* $adir/slot* $adir/drive* 2> /dev/null
+
+# create the autochanger configuration file
+cat > $adir/conf <<EOF
+maxdrive=8
+maxslot=80
+dbgfile=$adir/log
+EOF
+
+# turn on ach debug
+touch $adir/log
+
+# create 75 volumes
+for i in `seq 1 75`; do
+    echo $i:vol$i >> $adir/barcodes
+    cp /dev/null $adir/slot$i
+done
+
+# make a cleaning tape
+echo 76:CLN01 >> $adir/barcodes
+cp /dev/null $adir/slot76
+
+# keep other empty
+for i in `seq 77 79`; do
+    echo $i:  >> $adir/barcodes
+done
+