From 58739218a070ff6668beecf2b3b5e7173a663de9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Feb 2006 14:58:12 +0000 Subject: perl_checker fixes --- mdvonline_agent.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'mdvonline_agent.pl') 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 +} -- cgit v1.2.1