X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=application-src%2Fscript-email.pl;h=bf15980efd9a6367e1aa044d459c1bd9fbd2aac3;hb=c88ee0799dbba0d855be48a5c148c4586400b142;hp=b16f6a69b259c9d22ae51fb9f36ef06329e85e02;hpb=afaa71b3866b46b082b6c895772e15b36d8865fe;p=debian%2Famanda diff --git a/application-src/script-email.pl b/application-src/script-email.pl index b16f6a6..bf15980 100644 --- a/application-src/script-email.pl +++ b/application-src/script-email.pl @@ -1,5 +1,5 @@ #!@PERL@ -# Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. +# Copyright (c) 2008,2009 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 @@ -14,7 +14,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300 +# Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com use lib '@amperldir@'; @@ -33,7 +33,7 @@ use Amanda::Constants; sub new { my $class = shift; my ($execute_where, $config, $host, $disk, $device, $level, $index, $message, $collection, $record, $mailto) = @_; - my $self = $class->SUPER::new($execute_where); + my $self = $class->SUPER::new($execute_where, $config); $self->{execute_where} = $execute_where; $self->{config} = $config; @@ -65,86 +65,103 @@ sub command_support { #something sub command_pre_dle_amcheck { my $self = shift; + $self->sendmail("pre-dle-amcheck"); } sub command_pre_host_amcheck { my $self = shift; + $self->sendmail("pre-host-amcheck"); } sub command_post_dle_amcheck { my $self = shift; + $self->sendmail("post-dle-amcheck"); } sub command_post_host_amcheck { my $self = shift; + $self->sendmail("post-host-amcheck"); } sub command_pre_dle_estimate { my $self = shift; + $self->sendmail("pre-dle-estimate"); } sub command_pre_host_estimate { my $self = shift; + $self->sendmail("pre-host-estimate"); } sub command_post_dle_estimate { my $self = shift; + $self->sendmail("post-dle-estimate"); } sub command_post_host_estimate { my $self = shift; + $self->sendmail("post-host-estimate"); } sub command_pre_dle_backup { my $self = shift; + $self->sendmail("pre-dle-backup"); } sub command_pre_host_backup { my $self = shift; + $self->sendmail("pre-host-backup"); } sub command_post_dle_backup { my $self = shift; + $self->sendmail("post-dle-backup"); } sub command_post_host_backup { my $self = shift; + $self->sendmail("post-host-backup"); } sub command_pre_recover { my $self = shift; + $self->sendmail("pre-recover"); } sub command_post_recover { my $self = shift; + $self->sendmail("post-recover"); } sub command_pre_level_recover { my $self = shift; + $self->sendmail("pre-level-recover"); } sub command_post_level_recover { my $self = shift; + $self->sendmail("post-level-recover"); } sub command_inter_level_recover { my $self = shift; + $self->sendmail("inter-level-recover"); } @@ -164,7 +181,7 @@ sub sendmail { debug("cmd: $Amanda::Constants::MAILER $args\n"); my $mail; open $mail, '|-', $Amanda::Constants::MAILER, @args; - print $mail "$self->{config} $function $self->{host} $self->{disk} $self->{device} ", join (" ", @{$self->{level}}), "\n"; + print $mail "$self->{action} $self->{config} $function $self->{host} $self->{disk} $self->{device} ", join (" ", @{$self->{level}}), "\n"; close $mail; }