use lib '@amperldir@';
use strict;
+use warnings;
use File::Basename;
use Getopt::Long;
}
$tlf = Amanda::Config::config_dir_relative(getconf($CNF_TAPELIST));
- $tl = Amanda::Tapelist::read_tapelist($tlf);
+ $tl = Amanda::Tapelist->new($tlf);
if (!defined $tl) {
return failure("Can't load tapelist file ($tlf)", $finished_cb);
}
}
# update the tapelist
+ $tl->reload(1);
$tl->remove_tapelabel($opt_label);
- $tl->add_tapelabel("0", $opt_label, undef);
- $tl->write($tlf);
+ $tl->add_tapelabel("0", $opt_label, undef, 1);
+ $tl->write();
print "Success!\n";
# notify the changer
$res->set_label(label => $opt_label, finished_cb => $steps->{'labeled'});
} else {
- return failure("Volume not labeled.", $finished_cb);
+ return failure("Not writing label.", $finished_cb);
}
};