fixes for esx plugin mknetboot

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4624 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
cridye 2009-11-19 22:46:26 +00:00
parent 5f3a8c839a
commit 61faf24e92

View File

@ -14,7 +14,7 @@ use POSIX "WNOHANG";
use Getopt::Long;
use Thread qw(yield);
use POSIX qw(WNOHANG nice);
use File::Path;
use File::Path qw/mkpath rmtree/;
use File::Temp qw/tempdir/;
use File::Copy;
use IO::Socket; #Need name resolution
@ -2044,6 +2044,9 @@ sub mknetboot {
my %nodesubdata;
foreach my $key (keys %$bpadds){ #First, we identify all needed table.columns needed to aggregate database call
my $add = $bpadds->{$key}->[0]->{addkcmdline};
next if ! defined $add;
while ($add =~ /#NODEATTRIB:([^:#]+):([^:#]+)#/) {
push @{$tablecolumnsneededforaddkcmdline{$1}},$2;
$add =~ s/#NODEATTRIB:([^:#]+):([^:#]+)#//;
@ -2201,6 +2204,11 @@ sub cpNetbootImages {
sendmsg([1,"unable to mount partition 5 of the ESX netboot image to /mnt/xcat"]);
return;
}
if (! -d $destDir) {
print "making $destDir\n";
mkpath($destDir);
}
if(system("cp /mnt/xcat/* $destDir/")){
sendmsg([1,"Could not copy netboot contents to $destDir"]);