From 57b94e7f7538a0c475f945dcade983bca124287b Mon Sep 17 00:00:00 2001 From: daniceexi Date: Fri, 17 Jun 2011 08:44:01 +0000 Subject: [PATCH] defect 3317678: fix the issue that cannot get correct nodestate git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9835 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 8 ++++---- xCAT-server/lib/perl/xCAT/SvrUtils.pm | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 44f845640..b1c3e293b 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -503,7 +503,7 @@ sub makescript elsif ($os =~ /aix.*/) { $platform = "aix"; } elsif ($os =~ /AIX.*/) { $platform = "AIX"; } } - if (($nodesetstate) && ($nodesetstate eq "netboot")) + if (($nodesetstate) && ($nodesetstate eq "netboot" || $nodesetstate eq "statelite")) { $stat = "netboot"; } @@ -588,16 +588,16 @@ sub makescript } } } - else + if (!$syncfile) { my $stat = "install"; - if (($nodesetstate) && ($nodesetstate eq "netboot")) { + if (($nodesetstate) && ($nodesetstate eq "netboot" || $nodesetstate eq "statelite")) { $stat = "netboot"; } $syncfile = xCAT::SvrUtils->getsynclistfile(undef, $os, $arch, $profile, $stat); } - if (!defined($syncfile)) + if (!$syncfile) { push @scriptd, "NOSYNCFILES=1\n"; push @scriptd, "export NOSYNCFILES\n"; diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm index f96d9d04a..ecb6772b5 100644 --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -149,6 +149,13 @@ sub get_nodeset_state $state = $a[0]; } + if ($boottype eq "xnba") + { + require xCAT_plugin::xnba; + my $tmp = xCAT_plugin::xnba::getstate($node); + my @a = split(' ', $tmp); + $state = $a[0]; + } elsif ($boottype eq "yaboot") { require xCAT_plugin::yaboot;