]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/cleanup-2tape.in
Update
[bacula/bacula] / regress / scripts / cleanup-2tape.in
index 0f33ec95c7992c3f47cfba7969da2197118d2609..8fa197d4df7b2e0b6ca71afec068f9dccd7a1a1a 100755 (executable)
@@ -2,29 +2,8 @@
 #
 # 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 dummy 0`
-   if test x${drive} != x2; then
-      bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
-      bin/mtx-changer @autochanger@ load 2 @tape_drive@ 0
-   fi
-   mt -f @tape_drive@ rewind
-   mt -f @tape_drive@ 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 dummy 0`
-   if test x${drive} != x1; then
-      bin/mtx-changer @autochanger@ unload 0 @tape_drive@ 0
-      bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
-   fi
-fi
+. scripts/functions
 
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
+scripts/cleanup
+scripts/prepare-two-tapes