From: Eric Bollengier Date: Thu, 8 May 2008 07:51:12 +0000 (+0000) Subject: ebl tweak tape operation for faketape mode X-Git-Tag: Release-3.0.0~1481 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d04fc8d182965b97ea819f887bb2eadc1cf8440;p=bacula%2Fbacula ebl tweak tape operation for faketape mode git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6913 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/prototype.conf b/regress/prototype.conf index 46d8a25c58..42155247a6 100644 --- a/regress/prototype.conf +++ b/regress/prototype.conf @@ -47,6 +47,9 @@ WHICHDB="--with-mysql" # Set this if you use libdbi framework #LIBDBI="dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport = 5432" +# Set this if you use fake tape driver +#USE_FAKETAPE=yes + # Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" TCPWRAPPERS="--with-tcp-wrappers" diff --git a/regress/scripts/cleanup-2tape.in b/regress/scripts/cleanup-2tape.in index 28eea0b593..a4c90ab0b9 100755 --- a/regress/scripts/cleanup-2tape.in +++ b/regress/scripts/cleanup-2tape.in @@ -29,5 +29,10 @@ if test x@autochanger@ != x/dev/null; then fi fi -mt -f @tape_drive@ rewind -mt -f @tape_drive@ weof +if test a$USE_FAKETAPE = a; then + mt -f @tape_drive@ rewind + mt -f @tape_drive@ weof +else + cp /dev/null @tape_drive@ +fi + diff --git a/regress/scripts/cleanup-tape.in b/regress/scripts/cleanup-tape.in index e5ebe56344..56724a43ea 100755 --- a/regress/scripts/cleanup-tape.in +++ b/regress/scripts/cleanup-tape.in @@ -12,5 +12,11 @@ if test "x@autochanger@" != "x/dev/null" ; then bin/mtx-changer @autochanger@ load $SLOT1 @tape_drive@ 0 fi fi -mt -f @tape_drive@ rewind -mt -f @tape_drive@ weof + +if test a$USE_FAKETAPE = a; then + mt -f @tape_drive@ rewind + mt -f @tape_drive@ weof +else + cp /dev/null @tape_drive@ +fi +