From b968fbd914985f3a17e1599ac2bcad59ca4f1103 Mon Sep 17 00:00:00 2001 From: nott Date: Sun, 28 Sep 2008 16:25:43 +0000 Subject: [PATCH] Add setting of os attribute to nimnodeset and mkdsklsnode git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 63 +++++++++++----------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 2a15a526a..cb49bec72 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -725,24 +725,24 @@ ll~; # update the node definitions with the new osimage - if provided my %nodeattrs; - if ($::OSIMAGE) { - foreach my $node (keys %objhash) { - chomp $node; + foreach my $node (keys %objhash) { + chomp $node; - if (!grep(/^$node$/, @nodesfailed)) { - # change the node def if we were successful - $nodeattrs{$node}{objtype} = 'node'; - $nodeattrs{$node}{profile} = $::OSIMAGE; - } - } + if (!grep(/^$node$/, @nodesfailed)) { + # change the node def if we were successful + $nodeattrs{$node}{objtype} = 'node'; + $nodeattrs{$node}{os} = "AIX"; + if ($::OSIMAGE) { + $nodeattrs{$node}{profile} = $::OSIMAGE; + } + } + } - - if (xCAT::DBobjUtils->setobjdefs(\%nodeattrs) != 0) { - my $rsp; - push @{$rsp->{data}}, "$Sname: Could not write data to the xCAT database.\n"; - xCAT::MsgUtils->message("E", $rsp, $::callback); - $error++; - } + if (xCAT::DBobjUtils->setobjdefs(\%nodeattrs) != 0) { + my $rsp; + push @{$rsp->{data}}, "$Sname: Could not write data to the xCAT database.\n"; + xCAT::MsgUtils->message("E", $rsp, $::callback); + $error++; } # update the .rhosts file on the server so the rcp from the node works @@ -4201,21 +4201,22 @@ ll~; # update the node definitions with the new osimage - if provided # my %nodeattrs; - if ($::OSIMAGE) { - foreach my $node (keys %objhash) { - chomp $node; - if (!grep(/^$node$/, @nodesfailed)) { - # change the node def if we were successful - $nodeattrs{$node}{objtype} = 'node'; - $nodeattrs{$node}{profile} = $::OSIMAGE; - } - } - if (xCAT::DBobjUtils->setobjdefs(\%nodeattrs) != 0) { - my $rsp; - push @{$rsp->{data}}, "Could not write data to the xCAT database.\n"; - xCAT::MsgUtils->message("E", $rsp, $::callback); - $error++; - } + foreach my $node (keys %objhash) { + chomp $node; + if (!grep(/^$node$/, @nodesfailed)) { + # change the node def if we were successful + $nodeattrs{$node}{objtype} = 'node'; + $nodeattrs{$node}{os} = "AIX"; + if ($::OSIMAGE) { + $nodeattrs{$node}{profile} = $::OSIMAGE; + } + } + } + if (xCAT::DBobjUtils->setobjdefs(\%nodeattrs) != 0) { + my $rsp; + push @{$rsp->{data}}, "Could not write data to the xCAT database.\n"; + xCAT::MsgUtils->message("E", $rsp, $::callback); + $error++; } #