git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5123
91ce42f0-d328-0410-95d8-
f526ca767f89
my $t = 300 ;
if ($arg->{slots}) {
$slots = join(",", @{ $arg->{slots} });
my $t = 300 ;
if ($arg->{slots}) {
$slots = join(",", @{ $arg->{slots} });
+ $slots_sql = " AND Slot IN ($slots) ";
$t += 60*scalar( @{ $arg->{slots} }) ;
}
$t += 60*scalar( @{ $arg->{slots} }) ;
}
- 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 => $storage,
- drive => $arg->{drive},
- pool => 'Scratch',
- slots => $slots) ;
- $b->close();
- print "</pre>";
-
$self->dbh_do("
UPDATE Media
SET LocationId = (SELECT LocationId
FROM Location
WHERE Location = '$arg->{ach}'),
$self->dbh_do("
UPDATE Media
SET LocationId = (SELECT LocationId
FROM Location
WHERE Location = '$arg->{ach}'),
- RecyclePoolId = PoolId
-
- WHERE Media.PoolId = (SELECT PoolId
+ RecyclePoolId = (SELECT PoolId
FROM Pool
WHERE Name = 'Scratch')
FROM Pool
WHERE Name = 'Scratch')
- AND (LocationId = 0 OR LocationId IS NULL)
+
+ WHERE (LocationId = 0 OR LocationId IS NULL)
+ $slots_sql
+ 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 => $storage,
+ drive => $arg->{drive},
+ pool => 'Scratch',
+ slots => $slots) ;
+ $b->close();
+ print "</pre>";