]> git.sur5r.net Git - bacula/bacula/commitdiff
Optimize prepare-two-tapes + add -j3 to make
authorKern Sibbald <kern@sibbald.com>
Sun, 8 Jun 2008 10:02:33 +0000 (10:02 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 8 Jun 2008 10:02:33 +0000 (10:02 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7115 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/prepare-two-tapes.in
regress/scripts/setup

index 642a8f850ca7ffc8fca4376d955590d2f5b0f66f..18f61c160f84868d03db7fed7191e519602a0816 100755 (executable)
@@ -17,36 +17,35 @@ if test x@autochanger@ != x/dev/null; then
    case $slot in
    0)
       bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
-      init_drive @tape_drive@
       slot=$SLOT1
       ;;
    $SLOT1)
-      init_drive @tape_drive@
       slot=$SLOT1
       ;;
    $SLOT2)
-      init_drive @tape_drive@
       slot=$SLOT2
       ;;
    default)
       bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
       bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
-      init_drive @tape_drive@
       slot=$SLOT1
       ;;
   esac
+  init_drive @tape_drive@
+  bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
+
 
 # init the other slot
   case $slot in
    $SLOT1)
-      bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
       bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
-      init_drive @tape_drive@
       ;;
    $SLOT2)
-      bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
       bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
-      init_drive @tape_drive@
       ;;
+   default)
+      echo "Something went wrong. Expected $SLOT1 or $SLOT2, got $slot"
+      exit 1
    esac
+   init_drive @tape_drive@
 fi
index e452fa1f011428ed12894db3f63a9ea4dd9a0aaf..d9dc1533ec150f1ed22549d7b03f6ab9853beca1 100755 (executable)
@@ -33,7 +33,7 @@ check_exit_code
 cd src/win32
 make clean
 cd ../..
-make
+make -j3
 check_exit_code
 make install
 check_exit_code