From 83a7fc5612cfd1a6fe922f46163254ea297e4e4c Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Thu, 18 Feb 2021 16:32:14 +0100 Subject: [PATCH] Changed message disposition --- pandora_agents/unix/pandora_agent | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index fc942dfa86..77555337e7 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -592,7 +592,6 @@ BEGIN { my ($self) = @_; if ($YAML == 0) { - $self->set_last_error('Cannot use commands without YAML dependency, please install it.'); return; } @@ -4030,6 +4029,14 @@ if ($Conf{'proxy_mode'}) { } } +# Advice if YAML::Tiny is allowed in this system +eval { + eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available'); +}; +if ($@) { + log_message ('error', 'Cannot use commands without YAML dependency, please install it.'); +} + # Add the plugins directory to the PATH $ENV{'PATH'} .= ":$ConfDir/plugins";