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
This commit is contained in:
zhanx 2009-02-28 01:14:35 +00:00
parent f32021562c
commit 703b56e08c

View File

@ -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;
}