From 703b56e08c51feff3f0552593195a9f84e682a1f Mon Sep 17 00:00:00 2001 From: zhanx Date: Sat, 28 Feb 2009 01:14:35 +0000 Subject: [PATCH] Fix a defect in chvm: chvm might not handle some lines with quotation marks git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2813 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCvm.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/PPCvm.pm b/perl-xCAT/xCAT/PPCvm.pm index 502472c8c..3bd6d78c6 100644 --- a/perl-xCAT/xCAT/PPCvm.pm +++ b/perl-xCAT/xCAT/PPCvm.pm @@ -739,6 +739,7 @@ sub subst_profile my $cfgdata = shift; my $attrlist = shift; + $cfgdata =~ s/\\\"/\"/g; my @cfgarray = split /,/, $cfgdata; ########################################## # Repair those lines splitted incorrectly @@ -786,7 +787,7 @@ sub subst_profile } if ( $cfgline =~ /,/) { - $cfgline = "\"$cfgline\""; + $cfgline = "\\\"$cfgline\\\""; } push @final_array, $cfgline; }