3 # Test if Bacula can automatically create a Volume label.
6 scripts/copy-test-confs
8 echo "${cwd}/build" >/tmp/file-list
10 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
11 sed "s%# Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
15 echo " === Starting auto-label-test ==="
16 echo " === Starting auto-label-test ===" >>working/log
19 bin/bacula start 2>&1 >/dev/null
20 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
27 run job=CompressedTest storage=File yes
36 restore where=${cwd}/tmp/bacula-restores select storage=File
55 scripts/check_for_zombie_jobs storage=File
57 bin/bacula stop 2>&1 >/dev/null
58 grep "
\0Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
60 grep "
\0Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
62 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
63 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
66 echo " !!!!! auto-label-test failed!!! !!!!! "
67 echo " !!!!! auto-label-test failed!!! !!!!! " >>test.out
68 if [ $bstat != 0 -o $rstat != 0 ] ; then
69 echo " !!!!! Bad Job termination status !!!!! "
70 echo " !!!!! Bad Job termination status !!!!! " >>test.out
72 echo " !!!!! Restored files differ !!!!! "
73 echo " !!!!! Restored files differ !!!!! " >>test.out
77 echo " ===== auto-label-test OK ===== "
78 echo " ===== auto-label-test OK ===== " >>test.out