diff --git a/xCAT-server/lib/xcat/plugins/prescripts.pm b/xCAT-server/lib/xcat/plugins/prescripts.pm index 8d22e6a8f..6ce49bba6 100644 --- a/xCAT-server/lib/xcat/plugins/prescripts.pm +++ b/xCAT-server/lib/xcat/plugins/prescripts.pm @@ -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; }