From 6b52551a5ad70fd239a765c740a33e5888384bb8 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 13 Sep 2003 17:25:11 +0000 Subject: [PATCH] Tweak tape handling git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@702 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/cleanup-tape.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/regress/scripts/cleanup-tape.in b/regress/scripts/cleanup-tape.in index debc2a9840..64ad92f31b 100755 --- a/regress/scripts/cleanup-tape.in +++ b/regress/scripts/cleanup-tape.in @@ -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 -- 2.39.5