From eae580c867c447e99efc880d6e0f82156777e942 Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 29 Aug 2013 15:15:56 +0800 Subject: [PATCH] fix for 4261: add the getnodesetstat support for grub2 --- xCAT-server/lib/perl/xCAT/SvrUtils.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) mode change 100644 => 100755 xCAT-server/lib/perl/xCAT/SvrUtils.pm diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm old mode 100644 new mode 100755 index 483b80a18..40dc6f33a --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -53,6 +53,7 @@ sub getNodesetStates my @pxenodes = (); my @yabootnodes = (); my @xnbanodes= (); + my @grub2nodes = (); my $tabdata = $tab->getNodesAttribs(\@nodes, ['node', 'netboot']); foreach my $node (@nodes) { @@ -75,6 +76,10 @@ sub getNodesetStates { push(@aixnodes, $node); } + elsif ($nb eq "grub2") + { + push(@grub2nodes, $node); + } } my @retarray; @@ -131,6 +136,18 @@ sub getNodesetStates xCAT::MsgUtils->message('E', $retarray[1]); } } + if (@grub2nodes > 0) + { + require xCAT_plugin::grub2; + @retarray = + xCAT_plugin::grub2::getNodesetStates(\@grub2nodes, $hashref); + if ($retarray[0]) + { + $retcode = $retarray[0]; + $errormsg .= $retarray[1]; + xCAT::MsgUtils->message('E', $retarray[1]); + } + } } return (0, ""); }