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
34 run job=CompressedTest storage=File yes
43 restore where=${cwd}/tmp/bacula-restores select storage=File
63 if test "$debug" -eq 1 ; then
65 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
67 bin/bacula start 2>&1 >/dev/null
68 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
71 scripts/check_for_zombie_jobs storage=File
73 bin/bacula stop 2>&1 >/dev/null
74 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
76 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
78 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
79 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
82 echo " !!!!! auto-label-test failed!!! !!!!! "
83 echo " !!!!! auto-label-test failed!!! !!!!! " >>test.out
84 if [ $bstat != 0 -o $rstat != 0 ] ; then
85 echo " !!!!! Bad Job termination status !!!!! "
86 echo " !!!!! Bad Job termination status !!!!! " >>test.out
88 echo " !!!!! Restored files differ !!!!! "
89 echo " !!!!! Restored files differ !!!!! " >>test.out
93 echo " ===== auto-label-test OK ===== "
94 echo " ===== auto-label-test OK ===== " >>test.out