Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
use warnings;
use POSIX;
+use File::Basename;
BEGIN {
use Exporter ();
s/\s+$//;
next if m/^\#/;
next unless m/\S/;
- if (m/^($cfgvar_re)\s+(\S.*)$/) {
+ if (m/^include\s+(\S.*)$/i) {
+ my $newfn = $1;
+ if ($newfn !~ m#^/|^\./#) {
+ $newfn = dirname($cfgfile)."/".$newfn;
+ }
+ $readcfg->($newfn, 0);
+ } elsif (m/^($cfgvar_re)\s+(\S.*)$/) {
$c{$1} = $2;
} elsif (m/^($cfgvar_re)=\s*\<\<(\'?)(.*)\2\s*$/) {
my ($vn,$qu,$delim) = ($1,$2,$3);
For an example see ./standalone-config-example
Values later in the file, or in a later file, take precedence.
+You can say `Include <filename>'. <filename> is relative to the file
+doing the including, unless it starts with `/' or `./'.
+
========================================
Important config settings for standalone mode: