3 # Test if Bacula can automatically create a Volume label.
7 if test "$debug" -eq 1 ; then
13 scripts/copy-test-confs
15 echo "${cwd}/build" >/tmp/file-list
17 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
18 sed "s%# Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
22 echo " === Starting auto-label-test at `date +%R:%S` ==="
23 echo " === Starting auto-label-test at `date +%R:%S` ===" >>working/log
26 cat <<END_OF_DATA >tmp/bconcmds
33 run job=CompressedTest storage=File yes
42 restore where=${cwd}/tmp/bacula-restores select storage=File
62 if test "$debug" -eq 1 ; then
64 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
66 bin/bacula start 2>&1 >/dev/null
67 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
70 scripts/check_for_zombie_jobs storage=File
72 bin/bacula stop 2>&1 >/dev/null
73 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
75 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
77 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
78 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
81 echo " !!!!! auto-label-test failed!!! !!!!! "
82 echo " !!!!! auto-label-test failed!!! !!!!! " >>test.out
83 if [ $bstat != 0 -o $rstat != 0 ] ; then
84 echo " !!!!! Bad Job termination status !!!!! "
85 echo " !!!!! Bad Job termination status !!!!! " >>test.out
87 echo " !!!!! Restored files differ !!!!! "
88 echo " !!!!! Restored files differ !!!!! " >>test.out
92 echo " ===== auto-label-test OK ===== "
93 echo " ===== auto-label-test OK ===== " >>test.out