From 04688aeed4d3c333754f40fc97b05bfb04e9831c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 4 Mar 2008 16:07:44 +0000 Subject: [PATCH] -setupiscsidev creates iscsi directory if it doesn't exist git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@660 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/iscsi.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm b/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm index 1b9458df9..99362bbf1 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/iscsi.pm @@ -1,6 +1,7 @@ package xCAT_plugin::iscsi; use xCAT::Table; use Socket; +use File::Path; use Getopt::Long; Getopt::Long::Configure("bundling"); Getopt::Long::Configure("pass_through"); @@ -81,6 +82,9 @@ sub process_request { $callback->({error=>["$node: Unable to identify file to back iSCSI LUN, no iscsidir in site table nor iscsi.file entry for node"],errorcode=>[1]}); next; } + unless (-d $iscsiprefix) { + mkpath $iscsiprefix; + } $fileloc = "$iscsiprefix/$node"; $iscsitab->setNodeAttribs($node,{file=>$fileloc}); }