From 46531485dbe155f93a26e454b49de091d41311fd Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 5 Jul 2012 07:42:13 +0000 Subject: [PATCH] specify partition definition: support definition file for sles/suse git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13245 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 5f650e0e1..15f98393c 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -218,7 +218,12 @@ sub subvars { } else{ $partcontent =~ s/\s$//; - $inc =~ s/#XCAT_PARTITION_START#[\s\S]*#XCAT_PARTITION_END#/$partcontent/; + if ($inc =~ /#XCAT_PARTITION_START#/){ + $inc =~ s/#XCAT_PARTITION_START#[\s\S]*#XCAT_PARTITION_END#/$partcontent/; + } + elsif ($inc =~ //){ + $inc =~ s/[\s\S]*/$partcontent/; + } } } }