Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 Osstest.pm |    9 ++++++++-
 README     |    3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/Osstest.pm b/Osstest.pm
index 8e63389..9fbadbd 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -20,6 +20,7 @@ use strict;
 use warnings;
 
 use POSIX;
+use File::Basename;
 
 BEGIN {
     use Exporter ();
@@ -120,7 +121,13 @@ sub readglobalconfig () {
            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);
diff --git a/README b/README
index 9634185..0aaba2c 100644
--- a/README
+++ b/README
@@ -276,6 +276,9 @@ To set a value to the empty string, say
 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:
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to