From 7a347af3b9c94165dcc40ec529d867b3baf3f8a4 Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 13 Apr 2009 21:31:41 +0000 Subject: [PATCH] fixed in Postage.pm that caused failure in updatenode git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3183 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 2e0631286..e321f9326 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -214,12 +214,14 @@ sub makescript { push @{$rsp->{data}}, "Unable to open passwd table."; xCAT::MsgUtils->message("E", $rsp, $callback); } - - my $et = $passwdtab->getAttribs({key => 'system', username => 'root'}, 'password'); - if ($et and defined ($et->{'password'})) { + + if ($passwdtab) { + my $et = $passwdtab->getAttribs({key => 'system', username => 'root'}, 'password'); + if ($et and defined ($et->{'password'})) { push @scriptd, "ROOTPW=".$et->{'password'}."\n"; push @scriptd, "export ROOTPW\n"; - } + } + } } if (!$nodesetstate) { $nodesetstate=getnodesetstate($node);}