2012-02-10 Hirofumi Kosaka <kosaka@rworks.jp>

* pandora_agent: Allow filename wildcards to specify
	additional configuration files.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5543 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
hkosaka 2012-02-10 04:40:57 +00:00
parent a33fabf517
commit 433cfeb738
2 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2012-02-10 Hirofumi Kosaka <kosaka@rworks.jp>
* pandora_agent: Allow filename wildcards to specify
additional configuration files.
2012-01-03 Ramon Novoa <rnovoa@artica.es>
* pandora_agent: Added support for intensive modules.

View File

@ -549,11 +549,19 @@ sub read_config (;$) {
next if ($line =~ /^module\s*\w*/);
# Additional configuration file
if ($line =~ /^include\s+(.*)\s*/){
open (FILE, "$1") or next;
my @file_conf = <FILE>;
parse_conf_modules(\@file_conf);
close (FILE);
if ($line =~ /^include\s+(.*)\s*/) {
log_message ('setup', "include is $1");
$Conf{'include'} = $Conf{'include'} ? "$Conf{'include'} $1" : $1;
foreach my $file_name (glob("$1")) {
open (FILE, "$file_name") or next;
log_message ('setup', "reading $file_name");
my @file_conf = <FILE>;
parse_conf_modules(\@file_conf);
close (FILE);
}
next;
}
#Configuration token