make sure osimage.provmethod=statelite when calling liteimg command, defect 3409362

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2011-09-19 21:08:09 +00:00
parent da425d6ab1
commit f13ee60357

View File

@ -114,13 +114,19 @@ sub process_request {
return;
}
# get the os, arch, and profile from the image name table.
(my $ref) = $osimagetab->getAttribs({imagename => $imagename}, 'rootfstype', 'osvers', 'osarch', 'profile');
(my $ref) = $osimagetab->getAttribs({imagename => $imagename}, 'rootfstype', 'osvers', 'osarch', 'profile','provmethod');
if (!$ref) {
$callback->({error=>["Cannot find image \'$imagename\' from the osimage table."],errorcode=>[1]});
return;
}
$rootfstype = $ref->{'rootfstype'};
my $provmethod=$ref->{'provmethod'};
if ($provmethod !~ /statelite/) {
$callback->({error=>["Please make sure that osimage.provmethod is set to statelite before calling this command."],errorcode=>[1]});
return;
}
$rootfstype = $ref->{'rootfstype'};
$osver=$ref->{'osvers'};
$arch=$ref->{'osarch'};
$profile=$ref->{'profile'};