Merge pull request #1 from nielosz/Handle-Pipe-commands

Handle pipe commands
This commit is contained in:
nielosz
2016-03-09 11:38:23 +01:00

View File

@@ -76,6 +76,15 @@ if (!defined($config_file_cache{$file})) {
if (/^\s*\@(.*\S)/) {
# An include file reference .. parse it
local $incfile = $1;
# A pipe command
if ($incfile =~ /^\|"(.*)"$/) {
local $command = $1;
local $incfiles = `$command`;
foreach (split(/\s/,$incfiles)) {
local $inc = &read_config_file(substr($_,1));
push(@{$parent->{'members'}}, @$inc);
}
}
if ($incfile !~ /^\//) {
$incfile = "$config{'bacula_dir'}/$incfile";
}