]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/scripts/functions
Final changes
[bacula/bacula] / regress / scripts / functions
index 12d05f4cccd944c69fab191e098173f993357f70..7da6d3805812f0c25b3106b396813a8bc415dc76 100644 (file)
@@ -50,6 +50,15 @@ run_btape()
    fi
 }
 
+run_bscan()
+{
+   if test "$debug" -eq 1 ; then
+      bin/bscan $* | tee tmp/log.out
+   else
+      bin/bscan $* 2>&1 >/dev/null
+   fi
+}
+
 
 stop_bacula()
 {
@@ -63,7 +72,7 @@ check_for_zombie_jobs()
 
 change_jobname()
 {
-   if test $# == 1; then
+   if test $# -eq 1; then
       oldname=NightlySave
       newname=$1
    else
@@ -72,8 +81,8 @@ change_jobname()
    fi
    rm -f bin/1
    mv bin/bacula-dir.conf bin/1
-   echo "s%${oldname}%${newname}%g" >/tmp/1
-   sed -f /tmp/1 bin/1 >bin/bacula-dir.conf
+   echo "s%${oldname}%${newname}%g" >tmp/1
+   sed -f tmp/1 bin/1 >bin/bacula-dir.conf
 #  echo "Job ${oldname} changed to ${newname}"
 }
 
@@ -115,7 +124,9 @@ end_test()
    else
       echo "  ===== $TestName Bacula source OK `date +%R:%S` ===== "
       echo "  ===== $TestName OK `date +%R:%S` ===== " >>test.out
-      scripts/cleanup
+      if test "$debug" -eq 0 ; then
+         scripts/cleanup
+      fi
    fi
 }