From d66888546967f5624f290afb5f0aa01babfdd402 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 31 Oct 2008 13:59:11 +0000 Subject: [PATCH] -Have setupiscsidev handle lun number for gPXE use git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2437 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/iscsi.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/iscsi.pm b/xCAT-server/lib/xcat/plugins/iscsi.pm index f8d84f818..2a43d39eb 100644 --- a/xCAT-server/lib/xcat/plugins/iscsi.pm +++ b/xCAT-server/lib/xcat/plugins/iscsi.pm @@ -124,10 +124,17 @@ sub process_request { } } my $targname; - $iscsient = $iscsitab->getNodeAttribs($node,['target']); + my $lun; + $iscsient = $iscsitab->getNodeAttribs($node,['target','lun']); if ($iscsient and $iscsient->{target}) { $targname = $iscsient->{target}; } + if ($iscsient and defined($iscsient->{lun})) { + $lun = $iscsient->{lun}; + } else { + $lun = '1'; + $iscsitab->setNodeAttribs($node,{lun=>$lun}); + } unless ($targname) { my @date = localtime; my $year = 1900+$date[5];