From 419c3328e3a4df7af0d5d1ba14c7bf36cb4d22af Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 14 Oct 2009 19:49:16 +0000 Subject: [PATCH] bug fix for prescripts git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4389 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/prescripts.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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; }