client=${HOST}-fd
fi
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
+$bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
@output tmp/dir.out
status dir
@output tmp/fd.out
scripts/cleanup
if test x@autochanger@ != x/dev/null; then
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
+ slot=`$scripts/@changer_script@ @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/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
+ $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive1@ 1
fi
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
+ slot=`$scripts/@changer_script@ @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/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
+ $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ 0
fi
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
+ slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive1@ 1`
if test x$slot != x$SLOT2; then
echo "load slot $SLOT2 in drive 1"
- bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
+ $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1
fi
echo "WEOF drive 1"
init_drive @tape_drive1@
echo "unload slot $SLOT2 in drive 1"
- bin/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
+ $scripts/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
+ slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ 0`
echo "Slot $slot in drive 0"
if test x$slot != x$SLOT1; then
echo "load slot $SLOT1 in drive 0"
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0
fi
echo "WEOF drive 0"
init_drive @tape_drive@
echo "unload slot $SLOT1 from drive 0"
- bin/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0
+ $scripts/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0
fi
init_slot @tape_drive@ $SLOT1
if test x@autochanger@ != x/dev/null; then
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
+ slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
case $slot in
0)
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
;;
$SLOT1)
;;
*)
- bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
;;
esac
fi
echo "s% mail =%# mail = %g" >${outf}
echo "s% operator =%# operator =%g" >>${outf}
cp bin/bacula-dir.conf tmp/1
- sed -f ${outf} tmp/1 >bin/bacula-dir.conf
+ sed -f ${outf} tmp/1 > bin/bacula-dir.conf
echo " "
echo " "
echo " === Starting $TestName at `date +%R:%S` ==="
- echo " === Starting $TestName at `date +%R:%S` ===" >>working/log
+ echo " === Starting $TestName at `date +%R:%S` ===" >> working/log
echo " "
export zstat
}
bin/bacula-ctl-sd start
bin/bacula-ctl-fd start $1
bin/bacula-ctl-dir start
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf
return $?
else
- bin/bacula start 2>&1 >/dev/null
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ bin/bacula start >/dev/null 2>&1
+ cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf >/dev/null 2>&1
return $?
fi
}
run_bconsole()
{
if test "$debug" -eq 1 ; then
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
+ cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf
else
- cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
+ cat tmp/bconcmds | $bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
fi
}
run_btape()
{
if test "$debug" -eq 1 ; then
- cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 | tee tmp/log1.out
+ cat tmp/bconcmds | $bin/btape -c bin/bacula-sd.conf DDS-4 | tee tmp/log1.out
else
- cat tmp/bconcmds | bin/btape -c bin/bacula-sd.conf DDS-4 2>&1 >tmp/log1.out
+ cat tmp/bconcmds | $bin/btape -c bin/bacula-sd.conf DDS-4 >tmp/log1.out 2>&1
fi
}
run_bscan()
{
if test "$debug" -eq 1 ; then
- bin/bscan $* | tee tmp/log.out
+ $bin/bscan $* | tee tmp/log.out
else
- bin/bscan $* 2>&1 >/dev/null
+ $bin/bscan $* 2>&1 >/dev/null
fi
}
load_slot1()
{
# Get a tape from slot1
-slot=`bin/$MTX ${AUTOCHANGER} loaded 0 ${TAPE_DRIVE} $DRIVE1`
+slot=`$scripts/$MTX ${AUTOCHANGER} loaded 0 ${TAPE_DRIVE} $DRIVE1`
case $slot in
0)
- bin/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
slot=$SLOT1
;;
$SLOT1)
;;
*)
rewind_drive ${TAPE_DRIVE}
- bin/$MTX ${AUTOCHANGER} unload $slot ${TAPE_DRIVE} $DRIVE1
- bin/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/$MTX ${AUTOCHANGER} unload $slot ${TAPE_DRIVE} $DRIVE1
+ $scripts/$MTX ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
slot=$SLOT1
;;
esac
rewind_drive ${TAPE_DRIVE}
case $1 in
0)
- bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
slot=1
;;
$SLOT1)
- bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
- bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT2 ${TAPE_DRIVE} $DRIVE1
+ $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT2 ${TAPE_DRIVE} $DRIVE1
slot=2
;;
$SLOT2)
- bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
- bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $1 ${TAPE_DRIVE} $DRIVE1
+ $scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
slot=1
;;
*)
esac
}
-
# Save current directory
cwd=`pwd`
if test "x${REGRESS_DEBUG}" = "x1"; then
db_name=${db_name:-"regress"}
db_user=${db_user:-"regress"}
db_password=${db_password:-""}
+working=${working:-"$cwd/working"}
+bin=${bin:-"$cwd/bin"}
+scripts=${scripts:-"$bin"}
+
+export bin
+export working
+export scripts
CLIENT=${HOST}-fd
if [ x$USE_VTAPE = xyes ]; then
- mkdir -p $cwd/working/ach
+ mkdir -p $working/ach
SLOT1=1
SLOT2=2
- TAPE_DRIVE=$cwd/working/ach/drive1
- TAPE_DRIVE1=$cwd/working/ach/drive1
- AUTOCHANGER=$cwd/working/ach/config
+ TAPE_DRIVE=$working/ach/drive1
+ TAPE_DRIVE1=$working/ach/drive1
+ AUTOCHANGER=$working/ach/config
AUTOCHANGER_SCRIPT=disk-changer
DRIVE1=0
DRIVE2=1
fi
AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer}
-LD_LIBRARY_PATH=$cwd/bin:$LD_LIBRARY_PATH
+LD_LIBRARY_PATH=$bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
# optimize so we don't unnecessarily unload and load slots
#
if test x@autochanger@ != x/dev/null; then
- slot=`bin/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
+ slot=`$scripts/@changer_script@ @autochanger@ loaded 0 @tape_drive@ $DRIVE1`
case $slot in
0)
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
slot=$SLOT1
;;
$SLOT1)
slot=$SLOT2
;;
*)
- bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
slot=$SLOT1
;;
esac
init_drive @tape_drive@
- bin/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ unload $slot @tape_drive@ $DRIVE1
# init the other slot
case $slot in
$SLOT1)
- bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT2 @tape_drive@ $DRIVE1
;;
$SLOT2)
- bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
+ $scripts/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ $DRIVE1
;;
*)
echo "Something went wrong. Expected $SLOT1 or $SLOT2, got $slot"
exit 1
fi
+# we build and setup binaries to the $cwd/bin directory not $bin
rm -rf build bin
# Copy new source
echo "Copying source from ${BACULA_SOURCE}"
p Check with bls
################################################################
-${cwd}/bin/bls -c ${cwd}/bin/bacula-sd.conf -V 'TestVolume001' FileStorage > tmp/bls.out
+$bin/bls -c bin/bacula-sd.conf -V 'TestVolume001' FileStorage > tmp/bls.out
grep -- '----' tmp/bls.out | grep xxx > /dev/null
if [ $? != 0 ] ; then
bstat=2
bscan_libdbi
-${cwd}/bin/bscan -c ${cwd}/bin/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log
+$bin/bscan -c bin/bacula-sd.conf $BSCANLIBDBI -n regress -u regress -m -s -b tmp/bscan.bsr FileStorage 2>&1 > ${cwd}/tmp/bscan.log
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@$out ${cwd}/tmp/log1.out
mkdir -p ${cwd}/tmp/bacula-restores
if test "$debug" -eq 1 ; then
- bin/bextract -v -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores
+ $bin/bextract -v -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores
else
- bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
+ $bin/bextract -b working/restore.bsr -c bin/bacula-sd.conf ${cwd}/tmp ${cwd}/tmp/bacula-restores 2>&1 >/dev/null
fi
rstat=$?
grep "^ Termination: *Backup OK" ${cwd}/tmp/log1.out 2>&1 >/dev/null
END_OF_DATA
echo "Starting Bacula tape writing"
-#bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
+#$bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
#rewind
#label
#Test001
bscan_libdbi
-strace -o strace.new bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
exit
cat <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
fi
if test "$debug" -eq 1 ; then
- bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4
else
- bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 >/dev/null 2>&1
fi
echo $BSCANLIBDBI
fi
if test "$debug" -eq 1 ; then
- bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
else
- bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >tmp/log3.out
+ $bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp >tmp/log3.out 2>&1
fi
cat <<END_OF_DATA >tmp/bconcmds
change_jobname $JobName
start_test
-bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA 2>&1 >${cwd}/tmp/log1.out
+$bin/btape -c bin/bacula-sd.conf DDS-4 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1
fill
s
END_OF_DATA
-grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out 2>&1 >/dev/null
+grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out >/dev/null 2>&1
if [ $? != 0 ] ; then
echo " "
echo " "
END_OF_DATA
-bin/bacula start
-cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
+run_bacula
stop_bacula
-export dstat=0
-export bstat=0
-export rstat=0
+dstat=0
+bstat=0
+rstat=0
end_test
dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
else
echo "Creating a 56MB file with bacula-dir data ..."
- dd if=bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
+ dd if=$bin/bacula-dir of=${cwd}/tmp/1 bs=1024 count=1000
cat ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 ${cwd}/tmp/1 >${cwd}/tmp/2
rm -f ${cwd}/tmp/1
cat ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 ${cwd}/tmp/2 >>${cwd}/tmp/3
mkdir tmp/disk-changer
touch tmp/disk-changer/conf
echo "Unload drive 0"
-bin/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Test what is in drive 0"
-bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Load Slot 1 into drive 0"
-bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Test what is in drive 0"
-bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Unload drive 1"
-bin/disk-changer tmp/disk-changer/conf unload 2 tmp/disk-changer/drive1 1
+$scripts/disk-changer tmp/disk-changer/conf unload 2 tmp/disk-changer/drive1 1
echo "rtn=$?"
echo "Test what is in drive 1"
-bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
+$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
echo "rtn=$?"
echo "Load Slot 2 drive 1"
-bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
+$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
echo "rtn=$?"
echo "Test what is in drive 1"
-bin/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
+$scripts/disk-changer tmp/disk-changer/conf loaded 1 tmp/disk-changer/drive1 1
echo "rtn=$?"
echo "Load Slot 1 into drive 0 -- error"
-bin/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf load 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Load Slot 2 into drive 1 -- error"
-bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
+$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive1 1
echo "rtn=$?"
echo "Load Slot 2 in drive 0 -- error"
-bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Unload drive 0"
-bin/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
echo "rtn=$?"
echo "Load Slot 2 in drive 0 -- should fail"
-bin/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
+$scripts/disk-changer tmp/disk-changer/conf load 2 tmp/disk-changer/drive0 0
echo "rtn=$?"
run_bacula
touch ${cwd}/tmp/log1.out
-client=$(grep client= bin/bacula-dir.conf)
+client=`grep client= $bin/bacula-dir.conf`
check_for_zombie_jobs storage=File $client
stop_bacula
messages
quit
END_OF_DATA
-if test "$debug" -eq 1 ; then
- bin/bacula start
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
- bin/bacula start 2>&1 >/dev/null
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
-fi
+run_bacula
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 1 done"
messages
quit
END_OF_DATA
-if test "$debug" -eq 1 ; then
- bin/bacula start
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
- bin/bacula start 2>&1 >/dev/null
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
-fi
+
+run_bacula
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 2 done"
messages
quit
END_OF_DATA
-if test "$debug" -eq 1 ; then
- bin/bacula start
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
- bin/bacula start 2>&1 >/dev/null
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
-fi
+
+run_bacula
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 3 done"
messages
quit
END_OF_DATA
-if test "$debug" -eq 1 ; then
- bin/bacula start
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
-else
- bin/bacula start 2>&1 >/dev/null
- cat ${cwd}/tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
-fi
+run_bacula
scripts/check_for_zombie_jobs storage=DDS-4
echo "Backup 4 done"
JobName=Inc2disk
. scripts/functions
-
-stop_bacula
-cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
-cd ..
-
+scripts/cleanup
scripts/copy-2disk-confs
scripts/prepare-disk-changer
#
cwd=`pwd`
. scripts/functions
-bin/bacula stop 2>&1 >/dev/null
-cd bin
-./drop_bacula_tables >/dev/null 2>&1
-./make_bacula_tables >/dev/null 2>&1
-./grant_bacula_privileges 2>&1 >/dev/null
-cd ..
-
+scripts/cleanup
scripts/cleanup-tape
scripts/copy-tape-confs
echo "/lib" >${cwd}/tmp/file-list
echo " === Starting lib-tape-root test ==="
echo " "
echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+
+cat <<END_OF_DATA > >${cwd}/tmp/bconcmds
@output /dev/null
messages
@output ${cwd}/tmp/log1.out
@output
quit
END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
+
+run_bacula
+stop_bacula
+
cd /
${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
cd ${cwd}/tmp/bacula-restores
check_two_logs
scripts/check_for_zombie_jobs storage=DDS-4
-bin/bacula stop 2>&1 >/dev/null
+stop_bacula
for i in `cat ${cwd}/tmp/restore2-list`; do
diff $i ${cwd}/tmp/bacula-restores$i
if [ $? != 0 ] ; then
check_for_zombie_jobs storage=DDS-4
stop_bacula
-bin/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
+$scripts/${AUTOCHANGER_SCRIPT} ${AUTOCHANGER} unload $SLOT2 ${TAPE_DRIVE} 0
cat <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
echo " "
echo " "
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+cat <<END_OF_DATA > ${cwd}/tmp/bconcmds
@output /dev/null
messages
@output tmp/log1.out
@output
quit
END_OF_DATA
-bin/bacula stop 2>&1 >/dev/null
+run_bacula
+stop_bacula
cd /
${cwd}/bin/testls -e ${cwd}/scripts/exclude-usr-test lib >${cwd}/tmp/original
cd ${cwd}/tmp/bacula-restores
when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"`
when2=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+45))"`
-clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf`
+clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' $bin/bacula-dir.conf`
# Catalog record for cleaning tape "CLN01" successfully created.
# CLN01 | Cleaning