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
This commit is contained in:
jbjohnso 2012-05-11 14:59:46 +00:00
parent d3e17f1988
commit f35700c82e

View File

@ -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";
}