mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2009-07-08 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Config.pm: Properly set the new agentaccess config option. Fixes bug #2815878. * util/pandora_xml_stress.pl: Fixed config file comment detection. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1792 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
acde4709d1
commit
a6160671d1
@ -1,3 +1,10 @@
|
|||||||
|
2009-07-08 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Config.pm: Properly set the new agentaccess
|
||||||
|
config option. Fixes bug #2815878.
|
||||||
|
|
||||||
|
* util/pandora_xml_stress.pl: Fixed config file comment detection.
|
||||||
|
|
||||||
2009-06-30 Manuel Arostegui <marostegui@artica.es>
|
2009-06-30 Manuel Arostegui <marostegui@artica.es>
|
||||||
|
|
||||||
* pandora_server.spec: Now it builds packages for SLE9.
|
* pandora_server.spec: Now it builds packages for SLE9.
|
||||||
|
@ -216,6 +216,9 @@ sub pandora_load_config {
|
|||||||
$pa_config->{'mcast_change_group'} = '';
|
$pa_config->{'mcast_change_group'} = '';
|
||||||
$pa_config->{'mcast_change_port'} = '';
|
$pa_config->{'mcast_change_port'} = '';
|
||||||
|
|
||||||
|
# Update tagent_access
|
||||||
|
$pa_config->{"agentaccess"} = 1;
|
||||||
|
|
||||||
# Check for UID0
|
# Check for UID0
|
||||||
if ($pa_config->{"quiet"} != 0){
|
if ($pa_config->{"quiet"} != 0){
|
||||||
if ($> == 0){
|
if ($> == 0){
|
||||||
@ -472,6 +475,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^max_queue_files\s([0-9]*)/i) {
|
elsif ($parametro =~ m/^max_queue_files\s([0-9]*)/i) {
|
||||||
$pa_config->{'max_queue_files'}= clean_blank($1);
|
$pa_config->{'max_queue_files'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^agentaccess\s([0-1])/i) {
|
||||||
|
$pa_config->{'agentaccess'}= clean_blank($1);
|
||||||
|
}
|
||||||
|
|
||||||
} # end of loop for parameter #
|
} # end of loop for parameter #
|
||||||
|
|
||||||
|
@ -47,12 +47,16 @@ sub load_config ($\%\@) {
|
|||||||
if ($line =~ m/module_begin/) {
|
if ($line =~ m/module_begin/) {
|
||||||
my %module;
|
my %module;
|
||||||
|
|
||||||
|
# A comment
|
||||||
|
next if ($line =~ m/^#/);
|
||||||
|
|
||||||
while (my $line = <FILE>) {
|
while (my $line = <FILE>) {
|
||||||
last if ($line =~ m/module_end/);
|
|
||||||
|
|
||||||
# A comment
|
# A comment
|
||||||
next if ($line =~ m/^#/);
|
next if ($line =~ m/^#/);
|
||||||
|
|
||||||
|
last if ($line =~ m/module_end/);
|
||||||
|
|
||||||
# Unknown line
|
# Unknown line
|
||||||
next if ($line !~ /^\s*(\w+)\s+(.+)$/);
|
next if ($line !~ /^\s*(\w+)\s+(.+)$/);
|
||||||
|
|
||||||
@ -64,9 +68,6 @@ sub load_config ($\%\@) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
# A comment
|
|
||||||
next if ($line =~ m/^#/);
|
|
||||||
|
|
||||||
# Unknown line
|
# Unknown line
|
||||||
next if ($line !~ /^\s*(\w+)\s+(.+)$/);
|
next if ($line !~ /^\s*(\w+)\s+(.+)$/);
|
||||||
|
|
||||||
@ -82,7 +83,7 @@ sub generate_xml_files ($$$$$) {
|
|||||||
my ($agents, $start, $step, $conf, $modules) = @_;
|
my ($agents, $start, $step, $conf, $modules) = @_;
|
||||||
|
|
||||||
# Read agent configuration
|
# Read agent configuration
|
||||||
my $interval = get_conf_token ($conf, 'interval', '300');
|
my $interval = get_conf_token ($conf, 'agent_interval', '300');
|
||||||
my $xml_version = get_conf_token ($conf, 'xml_version', '1.0');
|
my $xml_version = get_conf_token ($conf, 'xml_version', '1.0');
|
||||||
my $encoding = get_conf_token ($conf, 'encoding', 'ISO-8859-1');
|
my $encoding = get_conf_token ($conf, 'encoding', 'ISO-8859-1');
|
||||||
my $os_name = get_conf_token ($conf, 'os_name', 'Linux');
|
my $os_name = get_conf_token ($conf, 'os_name', 'Linux');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user