]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix 2 drive WEOF
authorKern Sibbald <kern@sibbald.com>
Wed, 24 Aug 2005 18:47:32 +0000 (18:47 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 24 Aug 2005 18:47:32 +0000 (18:47 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2356 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/bacula-dir-win32-tape.conf
regress/scripts/cleanup-2drive.in
regress/tests/2drive-incremental-2tape

index a54de6b4b2157bf575fbc8942831f226ea0fef79..84898c71900135d35a166d87becf132a38ff7ba3 100644 (file)
@@ -13,7 +13,7 @@
 #
 
 Director {                            # define myself
-  Name = rufus-dir
+  Name = roxie-dir
   DIRport = 8101                # where we listen for UA connections
   QueryFile = "/home/kern/bacula/regress/bin/query.sql"
   WorkingDirectory = "/home/kern/bacula/regress/working"
index 705407f8390e5c1a29a1a54bd765473237230149..e0857f7995ec894279e13e48581809576b1cb1a7 100755 (executable)
@@ -5,28 +5,40 @@
 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
+   slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive1@ 1`
+   echo "Slot $slot in drive 1"
+   if ! test x$slot = x0 ; then
+      echo "unload slot $slot in drive 1"
+      bin/mtx-changer @autochanger@ unload $slot @tape_drive1@ 1
+   fi
+   slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive@ 0`
+   echo "Slot $slot in drive 0"
+   if ! test x$slot = x0 ; then
+      echo "unload slot $slot in drive 0"
+      bin/mtx-changer @autochanger@ unload $slot @tape_drive@ 0
+   fi
+
+
+   slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive1@ 1`
+   if ! test x$slot = x2; then
+      echo "load slot 2 in drive 1"
       bin/mtx-changer @autochanger@ load 2 @tape_drive1@ 1
    fi
+   echo "WEOF drive 1"
    mt -f @tape_drive1@ rewind
    mt -f @tape_drive1@ weof
+   echo "unload slot 2 in drive 1"
    bin/mtx-changer @autochanger@ unload 2 @tape_drive1@ 1
-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
+   slot=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive@ 0`
+   echo "Slot $slot in drive 0"
+   if ! test x$slot = x1; then
+      echo "load slot 1 in drive 0"
       bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0
    fi
+   echo "WEOF drive 0"
+   mt -f @tape_drive@ rewind
+   mt -f @tape_drive@ weof
+   echo "unload slot 1 from drive 0"
+   bin/mtx-changer @autochanger@ unload 1 @tape_drive@ 0
 fi
-
-mt -f @tape_drive@ rewind
-mt -f @tape_drive@ weof
-bin/mtx-changer @autochanger@ unload 1 @tape_drive@ 0
index c2c84d6b6264b66caa0977804d257eb172eaf6bd..7f8d90c2b7c89321c5a185112a1af46f61dfa239 100755 (executable)
@@ -5,7 +5,7 @@
 #
 # This script uses the autochanger and two tapes
 #
-debug=1
+debug=0
 if test "$debug" -eq 1 ; then
   out="tee"
 else
@@ -68,6 +68,7 @@ messages
 @# Force Incremental on the second Volume
 update volume=TestVolume001 VolStatus=Used
 status storage=DDS-4
+@#setdebug level=400 storage=DDS-4
 run level=Incremental job=NightlySave yes
 wait
 status storage=DDS-4
@@ -87,10 +88,8 @@ messages
 quit
 END_OF_DATA
 if test "$debug" -eq 1 ; then
-  bin/bacula start
   cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
 else
-  bin/bacula start 2>&1 >/dev/null
   cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf  2>&1 >/dev/null
 fi