echo " === Starting Backup Bacula Test ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
 @output /dev/null
 messages
-@output
+@output tmp/log1.out
 label
 TestVolume001
 run job=Client1
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out  
 restore
 5
 done
 yes
 @sleep 1
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-sleep 2
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== Backup Bacula Test failed!!! ===== "
 
 echo " === Starting bscan-test  ===" >working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
+@output tmp/log1.out
 label storage=File1
 TestVolume001
 label storage=File1
 6
 3000000
 10
-@output
 run job=NightlySave storage=File1
 yes
 wait
 messages
+@output /dev/null
 @#
 @# now purge the Volume
 @#
 yes
 delete volume=TestVolume002
 yes
+messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
 echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr
-bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 
-bin/bacula start
+bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
+@output tmp/log2.out
 @# 
 @# now do a restore
 @#
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build  tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== bscan-test Bacula source failed!!! ===== "
 
 echo " === Starting compressed-test ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
-@output
+@output tmp/log1.out
 label storage=File
 TestVolume001
 run job=CompressedTest
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out
 restore
 5
 done
 yes
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== compressed-test Bacula source failed!!! ===== "
 
 echo " === Starting six-vol-test  ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
 messages
-@output
+@output tmp/log1.out
 run job=MultiVol storage=File
 yes
 wait
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores
 5
 done
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop  2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== six-vol-test Bacula source failed!!! ===== "
 
 echo " === Starting sparse-compressed-test ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
-@output
+@output tmp/log1.out
 label storage=File
 TestVolume001
 run job=SparseCompressedTest
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out   
 restore
 5
 done
 yes
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== sparse-compressed-test Bacula source failed!!! ===== "
 
 
 bin/bacula start
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
-@output
+@output tmp/log2.out
 label storage=File
 TestVolume001
 run job=SparseTest
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out
 restore
 5
 done
 yes
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build /tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== sparse-test Bacula source failed!!! ===== "
 
 echo " === Starting two-jobs-test  ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
+@output tmp/log1.out
 label storage=File
 TestVolume001
 run job=CompressedTest
 # run a second job
 #
 bin/console -c bin/console.conf <<END_OF_DATA
+messages
+@output tmp/log1.out
 run job=CompressedTest
 yes
 wait
 messages
-@output
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out
 restore
 5
 done
 yes
 wait
-@output /dev/null
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
 diff -r build /tmp/bacula-restores${cwd}/build
 if [ $? != 0 ] ; then
    echo " "
 
 echo " === Starting two-vol-test  ===" >working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
+@output tmp/log1.out
 messages
 label storage=File1
 TestVolume001
 6
 3000000
 10
-@output
 run job=NightlySave storage=File1
 yes
 wait
 @# 
 @# now do a restore
 @#
+@output tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores
 5
 done
 messages
 quit
 END_OF_DATA
-bin/bacula stop
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
+rstat=$?
 diff -r build  tmp/bacula-restores${cwd}/build
-if [ $? != 0 ] ; then
+if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== two-vol-test Bacula source failed!!! ===== "
 
 echo " === Starting verify Volume Test ===" >>working/log
 echo " "
 
-bin/bacula start
+bin/bacula start 2>&1 >/dev/null
 bin/console -c bin/console.conf <<END_OF_DATA
-@output /dev/null
 messages
-@output
+@output tmp/log1.out
 label storage=File
 TestVolume001
 run job=NightlySave
 @# 
 @# now do a verify volume
 @#
+@output ${cwd}/tmp/original
 run job=VerifyVolume
 yes
 wait
-@tee ${cwd}/tmp/original
 messages
-@output
 quit
 END_OF_DATA
 sleep 2
-bin/bacula stop
-grep "Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
-if [ $? != 0 ] ; then
+bin/bacula stop 2>&1 >/dev/null
+grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
+bstat=$?
+grep "^Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
+if [ $? != 0 -o $bstat != 0 ] ; then
    echo " "
    echo " "
    echo "  ===== Verify Volume failed!!! ===== "