]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl tweak tape operation for faketape mode
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 8 May 2008 07:51:12 +0000 (07:51 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 8 May 2008 07:51:12 +0000 (07:51 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6913 91ce42f0-d328-0410-95d8-f526ca767f89

regress/prototype.conf
regress/scripts/cleanup-2tape.in
regress/scripts/cleanup-tape.in

index 46d8a25c580d6a2c401a8de10c21d1f6573a9803..42155247a64387d4f53822ed02cd6cf3dc3b4184 100644 (file)
@@ -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"
 
index 28eea0b59314231ce85ed090d7db065d9d3ca62b..a4c90ab0b9a25be25a2cd1f8ec17f125a86c6e2c 100755 (executable)
@@ -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
+
index e5ebe56344bf27fbea19c4f949826f96f5c06915..56724a43eaad60b4732f1d990458e020f0a9359b 100755 (executable)
@@ -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
+