summaryrefslogtreecommitdiffstats
path: root/mdvonline_agent.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-02-27 14:58:12 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-02-27 14:58:12 +0000
commit58739218a070ff6668beecf2b3b5e7173a663de9 (patch)
tree960922f4b6bb0031a84b3d6e5024bb51cbcc4628 /mdvonline_agent.pl
parent264b57ab763d9bbc6ae83c5ead1c4d9948de07f5 (diff)
downloadmgaonline-58739218a070ff6668beecf2b3b5e7173a663de9.tar
mgaonline-58739218a070ff6668beecf2b3b5e7173a663de9.tar.gz
mgaonline-58739218a070ff6668beecf2b3b5e7173a663de9.tar.bz2
mgaonline-58739218a070ff6668beecf2b3b5e7173a663de9.tar.xz
mgaonline-58739218a070ff6668beecf2b3b5e7173a663de9.zip
perl_checker fixes
Diffstat (limited to 'mdvonline_agent.pl')
-rw-r--r--mdvonline_agent.pl22
1 files changed, 11 insertions, 11 deletions
diff --git a/mdvonline_agent.pl b/mdvonline_agent.pl
index 3b8ebfb2..980a366e 100644
--- a/mdvonline_agent.pl
+++ b/mdvonline_agent.pl
@@ -38,13 +38,13 @@ use Discover;
use Log::Agent;
require Log::Agent::Driver::File; # logging made to file
logconfig(
- -driver => Log::Agent::Driver::File->make(
- -prefix => $0,
- -showpid => 1,
- -file => 'mdvonline.log',
+ '-driver' => Log::Agent::Driver::File->make(
+ '-prefix' => $0,
+ '-showpid' => 1,
+ '-file' => 'mdvonline.log',
),
#-caller => [ -display => '($sub/$line)', -postfix => 1 ],
- -priority => [ -display => '[$priority]' ],
+ '-priority' => [ '-display' => '[$priority]' ],
);
logsay "==================";
@@ -58,21 +58,21 @@ print Dumper(%conf);
logsay "checking for tasks";
print Dumper(%conf);
-my $answer = mdkonline::soap_get_task( $conf{HOST_ID}, $conf{HOST_KEY} );
+my $answer = mdkonline::soap_get_task($conf{HOST_ID}, $conf{HOST_KEY});
print Dumper($answer);
-if( $answer->{code} eq 0 ) {
- if( $answer->{data}->{command} eq 'none' ) {
+if ($answer->{code} == 0) {
+ if ($answer->{data}{command} eq 'none') {
logsay "nothing to do";
}
else {
logsay "got something";
- my $res = mdkonline::run_and_return_task( $answer->{data} );
+ mdkonline::run_and_return_task($answer->{data});
}
exit 1;
}
else {
- logwarn "something went wrong " . $answer->{message} . " (".$answer->{code}.")";
+ logwarn "something went wrong " . $answer->{message} . " (" . $answer->{code} . ")";
exit 0;
-} \ No newline at end of file
+}