From: Eric Bollengier Date: Sun, 15 Jun 2008 08:32:52 +0000 (+0000) Subject: ebl Modify disk-changer to check if slot contains something before X-Git-Tag: Release-7.0.0~4461 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0e600419eeb0d9ea716adca1b37ba4941f13071;p=bacula%2Fbacula ebl Modify disk-changer to check if slot contains something before loading it. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7140 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/scripts/bacula-sd-vtape.conf.in b/regress/scripts/bacula-sd-vtape.conf.in index 5e62ba65e4..f9eacd8220 100644 --- a/regress/scripts/bacula-sd-vtape.conf.in +++ b/regress/scripts/bacula-sd-vtape.conf.in @@ -47,7 +47,7 @@ Device { Maximum Volume Size = 30M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape } Device { @@ -60,11 +60,11 @@ Device { AlwaysOpen = yes; RemovableMedia = yes; @@sbindir@/tape_options - Maximum File Size = 7M - Maximum Volume Size = 30M + Maximum File Size = 8M + Maximum Volume Size = 50M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape } @@ -79,11 +79,11 @@ Device { RemovableMedia = yes; @@sbindir@/tape_options Auto Select = no - Maximum File Size = 7M - Maximum Volume Size = 30M + Maximum File Size = 8M + Maximum Volume Size = 50M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape } @@ -97,11 +97,11 @@ Device { AlwaysOpen = yes; RemovableMedia = yes; @@sbindir@/tape_options - Maximum File Size = 7M - Maximum Volume Size = 30M + Maximum File Size = 8M + Maximum Volume Size = 50M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape } @@ -119,7 +119,7 @@ Device { Maximum Volume Size = 30M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape } Device { @@ -136,7 +136,7 @@ Device { Maximum Volume Size = 30M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape Auto Select = no } @@ -154,7 +154,7 @@ Device { Maximum Volume Size = 30M Maximum Job Spool Size = 10M Spool Directory = @working_dir@ - Device Type = Tape + Device Type = VTape Label Type = ansi } diff --git a/regress/scripts/functions b/regress/scripts/functions index 391fc482f6..96095a3981 100644 --- a/regress/scripts/functions +++ b/regress/scripts/functions @@ -260,6 +260,18 @@ debug_wait() fi } +init_slot() +{ + DRIVE=$1 + SLOT=$2 + if test -n "$DRIVE" -a -n "$SLOT"; then + if test ! -c $DRIVE -a ! -b $DRIVE -a x$USE_VTAPE != x ; then + dir=`dirname $DRIVE` + touch $dir/slot$SLOT + fi + fi +} + init_drive() { if test a$USE_VTAPE = a; then diff --git a/regress/scripts/prepare-two-tapes.in b/regress/scripts/prepare-two-tapes.in index 18f61c160f..8e1cfa0cc1 100755 --- a/regress/scripts/prepare-two-tapes.in +++ b/regress/scripts/prepare-two-tapes.in @@ -8,6 +8,11 @@ scripts/cleanup + +# with disk-changer, we have to initialize slots +init_slot @tape_drive@ $SLOT1 +init_slot @tape_drive@ $SLOT2 + # # init first of two slots # optimize so we don't unnecessarily unload and load slots