diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog index adeaaa9503..d23c03eb21 100644 --- a/pandora_agents/unix/ChangeLog +++ b/pandora_agents/unix/ChangeLog @@ -1,3 +1,10 @@ +2010-10-04 Ramon Novoa + + * plugins/inventory: Fixed inventory process information. + + * pandora_agent: Fixed an error that showed when no logfile was + specified in the agent configuration file. + 2010-09-27 Junichi Satoh * FreeBSD/pandora_agent: Fixed a typo. diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 39e470350d..ec3ad00229 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -400,8 +400,14 @@ sub read_config (;$) { } } + # Token not found + if (defined ($token)) { + close (CONF_FILE); + return undef; + } + # Update the agent MD5 since agent_name may have changed - $AgentMD5 = md5 ($Conf{'agent_name'}) unless (defined ($token)); + $AgentMD5 = md5 ($Conf{'agent_name'}); $RemoteConfFile = "$AgentMD5.conf"; $RemoteMD5File = "$AgentMD5.md5"; @@ -409,7 +415,6 @@ sub read_config (;$) { $ThreadSem = Thread::Semaphore->new ($Conf{'agent_threads'}) if defined ($Sem); close (CONF_FILE); - return ''; } ################################################################################ diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory index f524298707..eafc77d137 100755 --- a/pandora_agents/unix/plugins/inventory +++ b/pandora_agents/unix/plugins/inventory @@ -93,7 +93,7 @@ sub get_servicies_init_machine($$) { sub get_processes ($$) { my ($name, $modules) = @_; - my $script = "ps aux"; + my $script = "ps -eo command"; my @services = `$script`; foreach my $row (@services) {