From: Kern Sibbald Date: Tue, 2 Aug 2005 16:44:48 +0000 (+0000) Subject: Updates X-Git-Tag: Release-1.38.0~224 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dedf0464af05518558397dc68aae9df0bcae53fa;p=bacula%2Fbacula Updates git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2280 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/scripts/cleanup-2drive.in b/regress/scripts/cleanup-2drive.in new file mode 100755 index 0000000000..1801abb506 --- /dev/null +++ b/regress/scripts/cleanup-2drive.in @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Cleanup left over files -- both before and after test run +# +scripts/cleanup + +if ! test x@autochanger@ = x/dev/null; then + drive=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive1@ 1` + if ! test x$drive = x2; then + bin/mtx-changer @autochanger@ unload $drive @tape_drive1@ 1 + bin/mtx-changer @autochanger@ load 2 @tape_drive1@ 1 + fi + mt -f @tape_drive1@ rewind + mt -f @tape_drive1@ weof +fi + + +# +# If we have an autochanger always load tape in slot 1 +# +if ! test x@autochanger@ = x/dev/null; then + drive=`bin/mtx-changer @autochanger@ loaded 0 @tape_drive@ 0` + if ! test x$drive = x1; then + bin/mtx-changer @autochanger@ unload $drive @tape_drive@ 0 + bin/mtx-changer @autochanger@ load 1 @tape_drive@ 0 + fi +fi + +mt -f @tape_drive@ rewind +mt -f @tape_drive@ weof diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index d7af152034..f264e3ba81 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -42,6 +42,7 @@ sed -f ${out} ${cwd}/scripts/bacula-sd-2tape.conf.in >${cwd}/scripts/bacula-sd-2 sed -f ${out} ${cwd}/scripts/bacula-sd-2drive.conf.in >${cwd}/scripts/bacula-sd-2drive.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/cleanup-2drive.in >${cwd}/scripts/cleanup-2drive 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