From 8ec0fc9c97cf50efc96effdc33beeaa81d2f00c9 Mon Sep 17 00:00:00 2001 From: jjhua Date: Wed, 23 Jan 2013 07:14:53 +0000 Subject: [PATCH] fixed bug 3309, remove the comments line which begins with ## git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14954 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index f2d563820..de7c814ac 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -859,16 +859,19 @@ sub subvars_for_mypostscript { my %dump_results; #First load input into memory.. while (<$inh>) { - $t_inc.=$_; + my $line = $_; + if ($line !~/^##/ ) { + $t_inc.=$line; + } - if( $_ =~ /#TABLE:([^:]+):([^:]+):([^#]+)#/ ) { + if( $line =~ /#TABLE:([^:]+):([^:]+):([^#]+)#/ ) { my $tabname=$1; my $key=$2; my $attrib = $3; $table{$tabname}{$key}{$attrib} = 1; } - - if( $_ =~ /^tabdump\(([\w]+)\)/) { + + if( $line =~ /^tabdump\(([\w]+)\)/) { my $tabname = $1; if( $tabname !~ /^(auditlog|bootparams|chain|deps|domain|eventlog|firmware|hypervisor|iscsi|kvm_nodedata|mac|nics|ipmi|mp|ppc|ppcdirect|site|websrv|zvm|statelite|rack|hosts|prodkey|switch|node)/) { push @tabs, $tabname;