X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famtape.pl;fp=server-src%2Famtape.pl;h=dec31ea6e62c7fad61f3913a009f95689b72a2d0;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=bb290014808ccca54956d6ba4ad41cc1e6097bfd;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/server-src/amtape.pl b/server-src/amtape.pl index bb29001..dec31ea 100644 --- a/server-src/amtape.pl +++ b/server-src/amtape.pl @@ -1,5 +1,5 @@ #! @PERL@ -# Copyright (c) 2009, 2010 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published @@ -550,7 +550,12 @@ sub { } elsif ($dev->status & $DEVICE_STATUS_VOLUME_UNLABELED and $dev->volume_header and $dev->volume_header->{'type'} == $Amanda::Header::F_WEIRD) { - print STDERR " contains a non-Amanda volume; check and relabel it with 'amlabel -f'\n"; + my $autolabel = getconf($CNF_AUTOLABEL); + if ($autolabel->{'non_amanda'}) { + print STDERR " contains a non-Amanda volume\n"; + } else { + print STDERR " contains a non-Amanda volume; check and relabel it with 'amlabel -f'\n"; + } } elsif ($dev->status & $DEVICE_STATUS_VOLUME_ERROR) { my $message = $dev->error_or_status(); print STDERR " can't read label: $message\n"; @@ -594,7 +599,12 @@ sub { if (defined $res->{'device'} and defined $res->{'device'}->volume_label()) { print STDERR "Will $modestr to volume '$label' in slot $slot.\n"; } else { - print STDERR "Will $modestr label '$label' to new volume in slot $slot.\n"; + my $header = $res->{'device'}->volume_header(); + if ($header->{'type'} == $Amanda::Header::F_WEIRD) { + print STDERR "Will $modestr label '$label' to non-Amanda volume in slot $slot.\n"; + } else { + print STDERR "Will $modestr label '$label' to new volume in slot $slot.\n"; + } } $res->release(finished_cb => sub { my ($err) = @_;