From 9383ceca984852e7e43464d7155639449b8ac00b Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 31 Dec 2013 17:03:21 +0800 Subject: [PATCH] add an enhancement to skip not well-formed deployment parameters. --- xCAT-server/lib/xcat/plugins/kit.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 2da8ee5ef..864dfed1e 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -473,15 +473,17 @@ sub assign_to_osimage } } + my @newlines; foreach my $line (@ls) { if ($line =~ /^#ENV:.+=.+#$/) { chomp($line); $line =~ s/^#ENV://; $line =~ s/#$//; + push @newlines, $line; } } - $deployparams = join ' ', @ls; + $deployparams = join ' ', @newlines; if (open(NEWLIST, ">>", "$installdir/osimages/$osimage/kits/KIT_COMPONENTS.postinstall")) { if ($deployparams) {