mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-21 19:22:05 +00:00
Failed to parse the prescripts without action defined (#5682)
This commit is contained in:
parent
7bf2984138
commit
017ab78ba5
@ -426,21 +426,19 @@ sub parseprescripts
|
||||
my $scripts = shift;
|
||||
my $action = shift;
|
||||
my $ret;
|
||||
if ($scripts) {
|
||||
if ($scripts =~ /:/) {
|
||||
my @a = split(/\|/, $scripts);
|
||||
foreach my $token (@a) {
|
||||
|
||||
#print "token=$token, action=$action\n";
|
||||
if ($scripts) {
|
||||
foreach my $token (split(/\|/, $scripts)) {
|
||||
if ($token =~ /:/) {
|
||||
if ($token =~ /^$action:(.*)/) {
|
||||
$ret = $1;
|
||||
last;
|
||||
$ret .= "$1,";
|
||||
}
|
||||
} else {
|
||||
$ret .= "$token,";
|
||||
}
|
||||
} else {
|
||||
$ret = $scripts;
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user