From a5542093475a26a4a4905766584a6d22c756fdb5 Mon Sep 17 00:00:00 2001 From: linggao Date: Thu, 15 Apr 2010 13:06:52 +0000 Subject: [PATCH] big fix git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/packimage.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index 726a124ff..1a4d877ef 100644 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -158,16 +158,17 @@ sub process_request { $excludetext .= $_; } close($exlist); - + #handle the #INLCUDE# tag recursively my $idir = dirname($exlistloc); my $doneincludes=0; while (not $doneincludes) { $doneincludes=1; - if ($excludetext =~ /#INCLUDE:[^#]+#/) { + if ($excludetext =~ /#INCLUDE:[^#^\n]+#/) { $doneincludes=0; - $excludetext =~ s/#INCLUDE:([^#]+)#/include_file($1,$idir)/eg; + $excludetext =~ s/#INCLUDE:([^#^\n]+)#/include_file($1,$idir)/eg; } + } my @tmp=split("\n", $excludetext); @@ -189,7 +190,7 @@ sub process_request { $includestr =~ s/-o $//; $includestr = "find . " . $includestr; } - #print "\nexcludestr=$excludestr\n\n includestr=$includestr\n\n"; + # print "\nexcludestr=$excludestr\n\n includestr=$includestr\n\n"; # add the xCAT post scripts to the image if (! -d "$rootimg_dir") {