#!/bin/sh # # Test the test command in btape # TestName="btape-test-changer" JobName=btapechanger . scripts/functions require_tape_drive require_autochanger scripts/cleanup scripts/copy-2tape-confs change_jobname $JobName start_test if test "$debug" -eq 1 ; then $bin/btape -c bin/bacula-sd.conf Drive-0 <>test.out echo " " exit 1 fi # # Increase block size to 262144 # cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf if test "$debug" -eq 1 ; then $bin/btape -c bin/bacula-sd.conf Drive-0 <${cwd}/tmp/log2.out 2>&1 test yes quit END_OF_DATA fi if [ $? != 0 ] ; then echo " " echo " " echo " !!!!! btape-changer test failed!!! !!!!! " echo " !!!!! btape-changer test failed!!! !!!!! " >>test.out echo " " else echo " ===== btape-changer test OK ===== " echo " ===== btape-changer test OK ===== " >>test.out scripts/cleanup fi