diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index d3141ce88..41adb0ace 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -148,10 +148,11 @@ sub setdestiny { my $updateattribs; if ($target) { my $archentries = $nodetypetable->getNodesAttribs($req->{node},['supportedarchs']); - if ($target =~ /^([^-]*)-([^-]*)-(.*)/) { + if ($target =~ /^([^-]*)-([^-]*)-([^-]*)-(.*)/) { $updateattribs->{os}=$1; $updateattribs->{arch}=$2; - $updateattribs->{profile}=$3; + $updateattribs->{provmethod}=$3; + $updateattribs->{profile}=$4; my $nodearch=$2; foreach (@{$req->{node}}) { if ($archentries->{$_}->[0]->{supportedarchs} and $archentries->{$_}->[0]->{supportedarchs} !~ /(^|,)$nodearch(\z|,)/) { diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index 3bf9d4ec8..36ae64051 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -335,7 +335,7 @@ sub liteMe { my $d = dirname($f); # if no such file like $rif, create one - if ( !(-e "$rif") ) { + unless ( -e "$rif" ) { my $rifstr = $rif; if($f =~ m{/$}) { $verbose && $callback->({info=>["mkdir -p $rif"]});