From f35700c82e438f314d99e07c8257f51669fa16b8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 11 May 2012 14:59:46 +0000 Subject: [PATCH] Eliminate needless sql call to get svloglocal git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12635 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Postage.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 88323bc8d..52f7ba7ca 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -293,10 +293,16 @@ sub makescript } push @scriptd, 'PATH=`dirname $0`:$PATH' . "\n"; push @scriptd, "export PATH\n"; - my $sent = $sitetab->getAttribs({key => 'svloglocal'}, 'value'); - if ($sent and defined($sent->{value})) + my $svloglocal; + if (keys %::XCATSITEVALS) { + $svloglocal = $::XCATSITEVALS{svloglocal}; + } else { + my $sent = $sitetab->getAttribs({key => 'svloglocal'}, 'value'); + if ($sent and defined($sent->{value})) { $svloglocal = $sent->{'value'}; } + } + if ($svloglocal) { - push @scriptd, "SVLOGLOCAL=" . $sent->{'value'} . "\n"; + push @scriptd, "SVLOGLOCAL=" . $svloglocal . "\n"; push @scriptd, "export SVLOGLOCAL\n"; }