]> git.sur5r.net Git - bacula/bacula/commitdiff
Updates
authorKern Sibbald <kern@sibbald.com>
Tue, 2 Aug 2005 16:44:48 +0000 (16:44 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 2 Aug 2005 16:44:48 +0000 (16:44 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2280 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/cleanup-2drive.in [new file with mode: 0755]
regress/scripts/do_sed

diff --git a/regress/scripts/cleanup-2drive.in b/regress/scripts/cleanup-2drive.in
new file mode 100755 (executable)
index 0000000..1801abb
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Cleanup left over files -- both before and after test run
+#
+scripts/cleanup
+
+if ! test x@autochanger@ = x/dev/null; then
+   drive=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive1@ 1`
+   if ! test x$drive = x2; then
+      bin/mtx-changer @autochanger@ unload $drive @tape_drive1@ 1
+      bin/mtx-changer @autochanger@ load 2 @tape_drive1@ 1
+   fi
+   mt -f @tape_drive1@ rewind
+   mt -f @tape_drive1@ weof
+fi
+
+
+#
+# If we have an autochanger always load tape in slot 1
+#
+if ! test x@autochanger@ = x/dev/null; then
+   drive=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive@ 0`
+   if ! test x$drive = x1; then
+      bin/mtx-changer @autochanger@ unload $drive @tape_drive@ 0
+      bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
+   fi
+fi
+
+mt -f @tape_drive@ rewind
+mt -f @tape_drive@ weof
index d7af152034ade96611070608ad22958361793e92..f264e3ba81147bdc09b652ec6d0132382bf87845 100755 (executable)
@@ -42,6 +42,7 @@ sed -f ${out} ${cwd}/scripts/bacula-sd-2tape.conf.in >${cwd}/scripts/bacula-sd-2
 sed -f ${out} ${cwd}/scripts/bacula-sd-2drive.conf.in >${cwd}/scripts/bacula-sd-2drive.conf
 sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape
 sed -f ${out} ${cwd}/scripts/cleanup-2tape.in >${cwd}/scripts/cleanup-2tape
+sed -f ${out} ${cwd}/scripts/cleanup-2drive.in >${cwd}/scripts/cleanup-2drive
 sed -f ${out} ${cwd}/scripts/prepare-two-tapes.in >${cwd}/scripts/prepare-two-tapes
 cp ${cwd}/bin/bacula-sd.conf /tmp/bac$$
 sed s%/tmp%${cwd}/tmp%g /tmp/bac$$ >${cwd}/bin/bacula-sd.conf