. scripts/functions
-copy_test_confs
+scripts/cleanup
+scripts/copy-test-confs
-rm -f bin/bacula-dir.conf
-rm -f tmp/RUN*
-rm -f ${cwd}/build/po/*old*
-rm -rf tmp/po
/bin/cp -f scripts/bacula-dir.conf.regexwhere bin/bacula-dir.conf
-echo "${cwd}/build/po" >/tmp/file-list
+#
+# Remove the !restored from the messages resource because
+# this test needs the restored listing to verify the
+# restore results
+#
+outf="${cwd}/tmp/sed_tmp"
+echo "s%, \!restored%%g" >${outf}
+cp ${cwd}/bin/bacula-fd.conf ${cwd}/tmp/1
+sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-fd.conf
+
+echo "${cwd}/build/po" >tmp/file-list
start_test
@## Where
m
9
-/tmp/bacula-restore-it
+tmp/bacula-restore-it
m
@## use add suffix
10
quit
END_OF_DATA
+run_bacula
-bin/bacula start
-cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf > /dev/null
stop_bacula
J=JobB
# $cwd begins with /
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
+ grep -q "tmp/bacula-restore${cwd}/po/fr.po.old" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobC
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
+ grep -q "tmp/bacula-restore${cwd}/build/po/fr.po" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobG
if grep -q "Restore OK" tmp/RUN_$J &&
- grep -q "/tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
+ grep -q "tmp/bacula-restore/build/po/fr.po" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok
else
J=JobJ
if grep -q "Restore OK" tmp/RUN_$J &&
grep -q "/etc/passwd.old" tmp/RUN_$J &&
- grep -q -e "Where: */tmp/bacula-restore-it" tmp/RUN_$J &&
+ grep -q -e "Where: *tmp/bacula-restore-it" tmp/RUN_$J &&
grep -q "${cwd}/build/po/fr.po.old" tmp/RUN_$J
then
[ "$debug" = 1 ] && echo $J ok