fix defect 3007885

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11365 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2012-01-10 15:15:51 +00:00
parent 7311af5ebb
commit 991b06ffc2

View File

@ -40,11 +40,11 @@ sub process_request {
}
my $tftpdir = xCAT::Utils->getTftpDir();
if (scalar(@{$request->{arg}}) != 1) {
$callback->({error=>"Need to specifiy architecture (x86, x86_64 or ppc64)"},{errorcode=>[1]});
my $arch = $request->{arg}->[0];
if (! $arch) {
$callback->({error=>"Need to specify architecture (x86, x86_64 or ppc64)"},{errorcode=>[1]});
return;
}
my $arch = $request->{arg}->[0];
unless (-d "$::XCATROOT/share/xcat/netboot/$arch") {
$callback->({error=>"Unable to find directory $::XCATROOT/share/xcat/netboot/$arch",errorcode=>[1]});
return;