diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index e2b7ce311d..7012a2771c 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,9 @@ +2012-04-25 Sergio Martin + + * unix/plugins/inventory: Fixed init_services inventory modules + in machines /etc/rc.d/rcX.d paths instead of /etc/rcX.d/ paths + Merged from 4.0.x + 2012-04-25 Sergio Martin * unix/plugins/inventory: Fixed several bugs in the diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 2dfa829dc3..deb1a2a844 100755 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -1,4 +1,4 @@ -# Base config file for Pandora FMS agents + # Version 3.0, GNU/Linux # Licensed under GPL license v2, # Copyright (c) 2003-2009 Artica Soluciones Tecnologicas @@ -31,7 +31,7 @@ udp_server_port 41122 udp_server_auth_address 0.0.0.0 # By default, agent takes machine name -#agent_name adama +agent_name huelga #Parent agent_name #parent_agent_name caprica diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory index df01a30a95..b125f42853 100755 --- a/pandora_agents/unix/plugins/inventory +++ b/pandora_agents/unix/plugins/inventory @@ -88,8 +88,15 @@ sub get_servicies_init_machine($$) { $runlevel =~ s/\s*$//; #rtrim #end trim($runlevel) - my $script = "ls /etc/rc" . $runlevel .".d/ -l | grep \"^l.*\" | grep \" S.* \" | cut -d' ' -f11"; - + my $script = ""; + + if (-e "/etc/rc" . $runlevel .".d/") { + $script = "ls /etc/rc" . $runlevel .".d/ -l | grep \"^l.*\" | grep \" S.* \" | cut -d' ' -f11"; + } + else { + $script = "ls /etc/rc.d/rc" . $runlevel .".d/ -l | grep \"^l.*\" | grep \" S.* \" | cut -d' ' -f11"; + } + my @services = `$script`; foreach my $row (@services) { next unless ($row =~ /^\S+\/(\S+)$/); diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index d210fadac2..0624876dec 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -17,7 +17,7 @@ # NOTE: The variables $*$ will be substituted in the installation wizard -server_ip $ServerIP$ +server_ip 172.18.183.4 server_path /var/spool/pandora/data_in temporal "$AgentTemp$"