From 991b06ffc2ccded6bd0338ea472a390c629fa806 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 10 Jan 2012 15:15:51 +0000 Subject: [PATCH] fix defect 3007885 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11365 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/mknb.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/mknb.pm b/xCAT-server/lib/xcat/plugins/mknb.pm index 2f5710c5b..1b7888f9a 100644 --- a/xCAT-server/lib/xcat/plugins/mknb.pm +++ b/xCAT-server/lib/xcat/plugins/mknb.pm @@ -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;