From bf653ceb562dd14ee90b4ec35adea0d2a2f99505 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 8 May 2008 07:51:12 +0000 Subject: [PATCH] ebl tweak tape operation for faketape mode git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6913 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/prototype.conf | 3 +++ regress/scripts/cleanup-2tape.in | 9 +++++++-- regress/scripts/cleanup-tape.in | 10 ++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) 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 + -- 2.39.5