]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/cleanup-2tape.in
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / scripts / cleanup-2tape.in
index e28d3468e8fea27f32b61e8a046911ef984d3ce6..f50de948636aa74bf4aa2f661be2a32be2e0eedf 100755 (executable)
@@ -1,30 +1,14 @@
 #!/bin/sh
 #
-# Cleanup left over files -- both before and after test run
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
 #
-scripts/cleanup
-
-if test ! x@autochanger@ = x/dev/null; then
-   drive=`bin/mtx-changer @autochanger@ loaded`
-   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
+# Cleanup left over files -- both before and after test run
 #
-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 0 @tape_drive@ 0
-      bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
-   fi
-fi
 
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
+. scripts/functions
+
+scripts/cleanup
+scripts/prepare-two-tapes