From: Kern Sibbald Date: Wed, 18 Jan 2017 13:05:54 +0000 (+0100) Subject: regress: tweak incremental-2media-tape to load the first tape X-Git-Tag: Beta-15.0.0~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5778a6afe6314607a569bb6c62adc156898ea14d;p=thirdparty%2Fbacula.git regress: tweak incremental-2media-tape to load the first tape --- diff --git a/regress/tests/incremental-2media-tape b/regress/tests/incremental-2media-tape index 16435205f..8de69a381 100755 --- a/regress/tests/incremental-2media-tape +++ b/regress/tests/incremental-2media-tape @@ -1,9 +1,7 @@ #!/bin/sh # -# Copyright (C) 2000-2022 Kern Sibbald +# Copyright (C) 2000-2020 Kern Sibbald # License: BSD 2-Clause; see file LICENSE-FOSS -# - # # Run a simple backup of the Bacula build directory then create some # new files, do an Incremental onto a different medium @@ -31,10 +29,23 @@ if test x`uname` = xFreeBSD ; then cp -f scripts/freebsd_tape_options bin/tape_options fi -mt -f /dev/nst0 rewind -mt -f /dev/nst0 weof -mt -f /dev/nst1 rewind -mt -f /dev/nst1 weof +mt -f /dev/nst0 status | grep ONLINE >/dev/null +stat=$? +if [ $stat -eq 0 ] ; then + mt -f /dev/nst0 rewind + mt -f /dev/nst0 weof +else + mtx -f $AUTOCHANGER load 1 0 +fi +mt -f /dev/nst1 status | grep ONLINE >/dev/null +stat=$? +if [ $stat -eq 0 ] ; then + mt -f /dev/nst1 rewind + mt -f /dev/nst1 weof +else + mtx -f $AUTOCHANGER load 2 1 + mtx -f $AUTOCHANGER status +fi echo "${cwd}/build" >${cwd}/tmp/file-list