bug fix for prescripts

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4389 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2009-10-14 19:49:16 +00:00
parent ae863aff1f
commit 419c3328e3

View File

@ -317,9 +317,14 @@ sub parseprescripts
my $ret;
if ($scripts) {
if ($scripts =~ /:/) {
if ($scripts =~ /$action:([^|]*)/) {
$ret=$1;
}
my @a=split(/\|/,$scripts);
foreach my $token (@a) {
#print "token=$token, action=$action\n";
if ($token =~ /^$action:(.*)/) {
$ret=$1;
last;
}
}
} else {
$ret=$scripts;
}