X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=regress%2Fscripts%2Fdo_sed;h=c5df3acaa54d1e314c47d3a426763070db14cb3a;hb=8864d43827b816503a3ef4afdc67ca6b3f81abd8;hp=165a20484aaab6cb50a0582ee178829d19c5ea7a;hpb=e0bdd8f0b9b7c7c33f146432e37f7aedbb3cb2b1;p=bacula%2Fbacula diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 165a20484a..c5df3acaa5 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -1,9 +1,10 @@ #!/bin/sh # -if test $# != 3 ; then +if test $# != 4 ; then echo "First arg must be email name" echo " and the second must be a tape drive" echo " and the third must be a tape control name or /dev/null" + echo " and the fourth must be the full path to the mtx program" exit 1 fi out="/tmp/sed_tmp" @@ -23,19 +24,37 @@ echo "s%@tape_drive@%${2}%g" >>${out} echo "s%@autochanger@%${3}%g" >>${out} echo "s%@tmpdir@%${cwd}/tmp%g" >>${out} echo "s%@hostname@%${host}%g" >>${out} +echo "s%@changer_path@%${4}%g" >>${out} # process .in files with sed script sed -f ${out} ${cwd}/scripts/test-bacula-dir.conf.in >${cwd}/scripts/test-bacula-dir.conf +sed -f ${out} ${cwd}/scripts/new-test-bacula-dir.conf.in >${cwd}/scripts/new-test-bacula-dir.conf sed -f ${out} ${cwd}/scripts/testa-bacula-dir.conf.in >${cwd}/scripts/testa-bacula-dir.conf sed -f ${out} ${cwd}/scripts/test-bacula-fd.conf.in >${cwd}/scripts/test-bacula-fd.conf sed -f ${out} ${cwd}/scripts/test-bacula-sd.conf.in >${cwd}/scripts/test-bacula-sd.conf sed -f ${out} ${cwd}/scripts/test-console.conf.in >${cwd}/scripts/test-console.conf sed -f ${out} ${cwd}/scripts/bacula-dir-tape.conf.in >${cwd}/scripts/bacula-dir-tape.conf sed -f ${out} ${cwd}/scripts/bacula-sd-tape.conf.in >${cwd}/scripts/bacula-sd-tape.conf +sed -f ${out} ${cwd}/scripts/bacula-sd-2tape.conf.in >${cwd}/scripts/bacula-sd-2tape.conf sed -f ${out} ${cwd}/scripts/cleanup-tape.in >${cwd}/scripts/cleanup-tape +sed -f ${out} ${cwd}/scripts/cleanup-2tape.in >${cwd}/scripts/cleanup-2tape +sed -f ${out} ${cwd}/scripts/prepare-two-tapes.in >${cwd}/scripts/prepare-two-tapes cp ${cwd}/bin/bacula-sd.conf /tmp/bac$$ sed s%/tmp%${cwd}/tmp%g /tmp/bac$$ >${cwd}/bin/bacula-sd.conf -chmod 777 ${cwd}/scripts/cleanup-tape +chmod 777 ${cwd}/scripts/cleanup-*tape ${cwd}/scripts/prepare-two-tapes +rm -f /tmp/bac$$ +cp ${cwd}/bin/mtx-changer /tmp/bac$$ +sed "s%^MTX.*$%MTX=${4}%g" /tmp/bac$$ >${cwd}/bin/mtx-changer +chmod 777 ${cwd}/bin/mtx-changer + +# get proper SD tape definitions +touch ${cwd}/bin/tape_options +if test x`uname` = xLinux ; then \ + cp -f ${cwd}/scripts/linux_tape_options ${cwd}/bin/tape_options ; \ +fi +if test x`uname` = xFreeBSD ; then \ + cp -f ${cwd}/scripts/freebsd_tape_options ${cwd}/bin/tape_options ; \ +fi rm -f ${out} rm -f /tmp/bac$$