2009-11-19 Ramon Novoa <rnovoa@artica.es>

* pandora_agent: Fixed bug #2888991. Skip remote_config if debug is enabled.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2114 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2009-11-19 00:34:27 +00:00
parent db01eaef99
commit 137881d72e
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-11-19 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Fixed bug #2888991. Skip remote_config if debug is enabled.
2009-11-18 Sancho Lerena <slerena@artica.es>
* pandora_agent: Fixed a problem sending the module type in the XML.

View File

@ -497,7 +497,7 @@ sub guess_os_version ($) {
# Check command line arguments
print_usage unless ($#ARGV == 0);
$ConfDir = $ARGV[0];
$ConfDir = fix_directory ($ARGV[0]);
error ("Directory '$ConfDir' does not exist.") unless (-d "$ConfDir");
# Guess the OS version
@ -513,8 +513,8 @@ start_log ();
read_config ();
# Fix directory names
$ConfDir = fix_directory ($ConfDir);
$Conf{'temporal'} = fix_directory ($Conf{'temporal'});
error ("Temporal directory '" . $Conf{'temporal'} . "' does not exist.") unless (-d "$Conf{'temporal'}");
$Conf{'server_path'} = fix_directory ($Conf{'server_path'});
$Conf{'secondary_server_path'} = fix_directory ($Conf{'secondary_server_path'});
@ -526,7 +526,7 @@ sleep ($Conf{'delayed_startup'});
while (1) {
# Check for a new configuration
check_remote_config ();
check_remote_config () unless ($Conf{'debug'} eq '1');
my $xml = "<?xml version='1.0' encoding='" . $Conf{'encoding'} . "'?>\n" .
"<agent_data description='" . $Conf{'description'} ."' group='" . $Conf{'group'} .
@ -570,8 +570,14 @@ while (1) {
# Execute plugins
foreach my $plugin (@Plugins) {
# Verify that the plugin exists and execute it
next unless (-x '$ConfDir/plugins/$plugin');
my $output = `$ConfDir/plugins/$plugin`;
# Do not save the output if there was an error
next unless ($? eq 0);
$xml .= $output;
}