X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=application-src%2Famsuntar.pl;h=6cf0cf1db39a91fbe8bded7b384f2d83b3d830b4;hb=d65404863e3d293566f37e99a062a7524eff623f;hp=ad32c160278e08befe62448941d765853bb8fb0f;hpb=b221e8dc16f345f8c8d7df8df71f4d36daaabb4c;p=debian%2Famanda diff --git a/application-src/amsuntar.pl b/application-src/amsuntar.pl index ad32c16..6cf0cf1 100755 --- a/application-src/amsuntar.pl +++ b/application-src/amsuntar.pl @@ -1,9 +1,10 @@ #!@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 -# by the Free Software Foundation. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -35,7 +36,7 @@ use Amanda::Constants; use Amanda::Config qw( :init :getconf config_dir_relative ); use Amanda::Debug qw( :logging ); use Amanda::Paths; -use Amanda::Util qw( :constants ); +use Amanda::Util qw( :constants quote_string ); sub new { my $class = shift; @@ -144,6 +145,11 @@ sub command_support { sub command_selfcheck { my $self = shift; + $self->print_to_server("disk " . quote_string($self->{disk})); + + $self->print_to_server("amsuntar version " . $Amanda::Constants::VERSION, + $Amanda::Script_App::GOOD); + if (!-e $self->{suntar}) { $self->print_to_server_and_die( "application binary $self->{suntar} doesn't exist", @@ -157,7 +163,6 @@ sub command_selfcheck { if (!defined $self->{disk} || !defined $self->{device}) { return; } - print "OK " . $self->{disk} . "\n"; print "OK " . $self->{device} . "\n"; print "OK " . $self->{directory} . "\n" if defined $self->{directory}; $self->validate_inexclude();