2012-04-25 Sergio Martin <sergio.martin@artica.es>
* 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6162 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a3236c252e
commit
d48ae7a199
|
@ -1,3 +1,9 @@
|
|||
2012-04-25 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* 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 <sergio.martin@artica.es>
|
||||
|
||||
* unix/plugins/inventory: Fixed several bugs in the
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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+)$/);
|
||||
|
|
|
@ -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$"
|
||||
|
||||
|
|
Loading…
Reference in New Issue