echo " "
}
+require_root()
+{
+MUID=`/usr/bin/id | awk -F= '{print $2}' | awk -F\( '{print $1}'`
+if [ $MUID != 0 ] ; then
+ echo " "
+ echo "You must be root to run this test."
+ echo " ===== !!!! $TestName not run at `date +%R:%S` ==="
+ echo " ===== !!!! $TestName not run at `date +%R:%S` !!!! ===== " >>test.out
+ echo " "
+ exit 1
+fi
+}
+
+
set_debug()
{
debug=$1
{
debug_wait
if test "$debug" -eq 1 ; then
- bin/bacula start
+ bin/bacula-ctl-sd start
+ bin/bacula-ctl-fd start
+ bin/bacula-ctl-dir start
cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
else
bin/bacula start 2>&1 >/dev/null
check_for_zombie_jobs()
{
- scripts/check_for_zombie_jobs $1
+ scripts/check_for_zombie_jobs $*
}
change_jobname()
bstat=$?
grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
rstat=$?
+ grep "^ Termination: *Restore OK -- warning file count mismatch" tmp/log2.out 2>&1 >/dev/null
+ if test $? -eq 0; then
+ rstat = 2
+ fi
}
check_restore_diff()
if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
echo " "
- echo " !!!!! $TestName Bacula source failed!!! !!!!! "
+ echo " !!!!! $TestName failed!!! !!!!! "
echo " !!!!! $TestName failed!!! !!!!! " >>test.out
if [ $bstat != 0 -o $rstat != 0 ] ; then
echo " !!!!! Bad Job termination status !!!!! "
echo " !!!!! Bad Job termination status !!!!! " >>test.out
+ echo " bstat=$bstat rstat=$rstat dstat=$dstat"
else
echo " !!!!! Restored files differ !!!!! "
echo " !!!!! Restored files differ !!!!! " >>test.out
+ echo " bstat=$bstat rstat=$rstat dstat=$dstat"
fi
echo " "
else
- echo " ===== $TestName Bacula source OK `date +%R:%S` ===== "
+ echo " ===== $TestName OK `date +%R:%S` ===== "
echo " ===== $TestName OK `date +%R:%S` ===== " >>test.out
if test "$debug" -eq 0 ; then
scripts/cleanup
else
set_debug 0
fi
+
+# Source the configuration variables
+. ${cwd}/config