From 8372aa87a7c9e52b6ec4b9c5a907e80b4b591b82 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 19 Jan 2007 17:23:36 +0000 Subject: [PATCH] ebl fix label_barcodes (use drive name instead of autochanger name) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4023 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/lib/Bweb.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 3c17b9375d..53077ca908 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -3004,6 +3004,16 @@ sub label_barcodes return $self->error("Can't find autochanger name"); } + my $a = $self->ach_get($arg->{ach}); + unless ($a) { + return $self->error("Can't find autochanger name in configuration"); + } + + my $storage = $a->get_drive_name($arg->{drive}); + unless ($storage) { + return $self->error("Can't get your drive name"); + } + my $slots = ''; my $t = 300 ; if ($arg->{slots}) { @@ -3014,7 +3024,7 @@ sub label_barcodes my $b = new Bconsole(pref => $self->{info}, timeout => $t,log_stdout => 1); print "

This command can take long time, be patient...

"; print "
" ;
-    $b->label_barcodes(storage => $arg->{ach},
+    $b->label_barcodes(storage => $storage,
 		       drive => $arg->{drive},
 		       pool  => 'Scratch',
 		       slots => $slots) ;
-- 
2.39.2