]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl fix label_barcodes (use drive name instead of autochanger name)
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 19 Jan 2007 17:23:36 +0000 (17:23 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 19 Jan 2007 17:23:36 +0000 (17:23 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4023 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lib/Bweb.pm

index 3c17b9375d48e9f9c46cb3af2719433fcdfb2daa..53077ca908599cc14000023e26ac73ffaf014e39 100644 (file)
@@ -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 "<h1>This command can take long time, be patient...</h1>";
     print "<pre>" ;
-    $b->label_barcodes(storage => $arg->{ach},
+    $b->label_barcodes(storage => $storage,
                       drive => $arg->{drive},
                       pool  => 'Scratch',
                       slots => $slots) ;