]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak tape handling
authorKern Sibbald <kern@sibbald.com>
Sat, 13 Sep 2003 17:25:11 +0000 (17:25 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 13 Sep 2003 17:25:11 +0000 (17:25 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@702 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/cleanup-tape.in

index debc2a98409e31fcd3f96769c9dcd0a29c9af577..64ad92f31b26fb4d78eb35e56418b290c43b10ee 100755 (executable)
@@ -6,5 +6,16 @@ rm -rf /tmp/TestVolume001 /tmp/bacula-restores /tmp/Small*
 rm -rf tmp/original tmp/bacula-restores tmp/Small* tmp/TestVolume*
 rm -rf tmp/restored tmp/largefile tmp/bscan.bsr tmp/log*.out
 
+#
+# 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`
+   if ! test x$drive = x1; then
+      bin/mtx-changer @autochanger@ unload
+      bin/mtx-changer @autochanger@ load 1
+   fi
+fi
+
 mt -f @tape_drive@ rewind
 mt -f @tape_drive@ weof