projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
oops, need this patch file too
[debian/amanda]
/
perl
/
Amanda
/
Script_App.pm
diff --git
a/perl/Amanda/Script_App.pm
b/perl/Amanda/Script_App.pm
index 3b6ff69a0e5d378728e26ee01753828720d4061f..f0ce34919ae837c9cb1190cc4ccd0985e9563135 100644
(file)
--- a/
perl/Amanda/Script_App.pm
+++ b/
perl/Amanda/Script_App.pm
@@
-1,5
+1,5
@@
# vim:ft=perl
# vim:ft=perl
-# Copyright (c) 2008
,2009
Zmanda, Inc. All Rights Reserved.
+# Copyright (c) 2008
-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
#
# 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
@@
-23,6
+23,7
@@
no warnings;
no strict;
$GOOD = 0;
$ERROR = 1;
no strict;
$GOOD = 0;
$ERROR = 1;
+$FAILURE = 2;
use strict;
use warnings;
use strict;
use warnings;
@@
-60,6
+61,7
@@
sub new {
$execute_where = "client";
}
Amanda::Util::setup_application($name, $execute_where, $CONTEXT_DAEMON);
$execute_where = "client";
}
Amanda::Util::setup_application($name, $execute_where, $CONTEXT_DAEMON);
+ debug("Arguments: " . join(' ', @ARGV));
#initialize config client to get values from amanda-client.conf
config_init($CONFIG_INIT_CLIENT, undef);
#initialize config client to get values from amanda-client.conf
config_init($CONFIG_INIT_CLIENT, undef);
@@
-116,11
+118,13
@@
sub print_to_server {
} elsif ($self->{action} eq "backup") {
if ($status == $Amanda::Script_App::GOOD) {
print {$self->{mesgout}} "| $msg\n";
} elsif ($self->{action} eq "backup") {
if ($status == $Amanda::Script_App::GOOD) {
print {$self->{mesgout}} "| $msg\n";
- } els
e
{
+ } els
if ($status == $Amanda::Script_App::ERROR)
{
print {$self->{mesgout}} "? $msg\n";
print {$self->{mesgout}} "? $msg\n";
+ } else {
+ print {$self->{mesgout}} "sendbackup: error $msg\n";
}
} elsif ($self->{action} eq "restore") {
}
} elsif ($self->{action} eq "restore") {
- print STD
OUT
"$msg\n";
+ print STD
ERR
"$msg\n";
} elsif ($self->{action} eq "validate") {
print STDERR "$msg\n";
} else {
} elsif ($self->{action} eq "validate") {
print STDERR "$msg\n";
} else {
@@
-180,6
+184,10
@@
sub do {
$self->{action} = 'validate';
}
$self->{action} = 'validate';
}
+ if ($action eq 'backup') {
+ $self->_set_mesgout();
+ }
+
# now convert it to a function name and see if it's
# defined
my $function_name = "command_$command";
# now convert it to a function name and see if it's
# defined
my $function_name = "command_$command";