4 echo "First arg must be email name"
5 echo " and the second must be a tape drive"
6 echo " and the third must be a tape control name or /dev/null"
11 host=`hostname | tr '.' ' ' | cut -f 1 -d ' '`
12 if test x$host = x ; then
15 # Create sed command script
16 echo "s%@sbindir@%${cwd}/bin%g" >${out}
17 echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
18 echo "s%@working_dir@%${cwd}/working%g" >>${out}
19 echo "s%@piddir@%${cwd}/working%g" >>${out}
20 echo "s%@subsysdir@%${cwd}/working%g" >>${out}
21 echo "s%@job_email@%${1}%g" >>${out}
22 echo "s%@tape_drive@%${2}%g" >>${out}
23 echo "s%@autochanger@%${3}%g" >>${out}
24 echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
25 echo "s%@hostname@%${host}%g" >>${out}
27 # process .in files with sed script
28 sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf
29 sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf
30 sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf
31 sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf
32 sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf
33 sed -f ${out} ${cwd}/scripts/bacula-dir-tape.conf.in >${cwd}/scripts/bacula-dir-tape.conf
34 sed -f ${out} ${cwd}/scripts/bacula-sd-tape.conf.in >${cwd}/scripts/bacula-sd-tape.conf
35 sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape
36 chmod 777 ${cwd}/scripts/cleanup-tape