From bf6d469713960cdaa950e05958eac2d173c9bc82 Mon Sep 17 00:00:00 2001 From: nott Date: Sun, 20 May 2012 13:11:34 +0000 Subject: [PATCH] hasn- fix provmethod update git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 0c5cdf2fe..cc701f9d3 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -7884,6 +7884,7 @@ sub prenimnodeset next; } } + if (!grep (/^$nodeosi{$node}$/, @image_names)) { push(@image_names, $nodeosi{$node}); @@ -10829,14 +10830,17 @@ sub mkdsklsnode $filestring .="$cdloc/$f "; } } - my $ccmd=qq~/usr/bin/cp -p -r $filestring $bkloc 2>/dev/null~; - my $output = xCAT::Utils->runcmd("$ccmd", -1); - if ($::RUNCMD_RC != 0) - { - my $rsp; - push @{$rsp->{data}}, "Could not copy files to $bkloc. \n"; - xCAT::MsgUtils->message("E", $rsp, $callback); - $error++; + + if ($filestring) { + my $ccmd=qq~/usr/bin/cp -p -r $filestring $bkloc 2>/dev/null~; + my $output = xCAT::Utils->runcmd("$ccmd", -1); + if ($::RUNCMD_RC != 0) + { + my $rsp; + push @{$rsp->{data}}, "Could not copy files to $bkloc. \n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + $error++; + } } } } @@ -10856,11 +10860,8 @@ sub mkdsklsnode # change the node def if we were successful $nodeattrs{$node}{objtype} = 'node'; $nodeattrs{$node}{os} = "AIX"; - if ($::OSIMAGE) - { - $nodeattrs{$node}{profile} = $::OSIMAGE; - $nodeattrs{$node}{provmethod} = $::OSIMAGE; - } + $nodeattrs{$node}{profile} = $nodeosi{$node}; + $nodeattrs{$node}{provmethod} = $nodeosi{$node}; } } if (xCAT::DBobjUtils->setobjdefs(\%nodeattrs) != 0)