From 00710fc339c0dd96118b734c0b94c49bc6075153 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 17 Jan 2013 21:43:27 +0000 Subject: [PATCH] Correct previous attempt to conditionally populate scriptcontents. Moving the scope inside the conditional obliterated it from outside git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14914 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/getpostscript.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/getpostscript.pm b/xCAT-server/lib/xcat/plugins/getpostscript.pm index eb2897cd3..32421a368 100644 --- a/xCAT-server/lib/xcat/plugins/getpostscript.pm +++ b/xCAT-server/lib/xcat/plugins/getpostscript.pm @@ -81,11 +81,12 @@ sub process_request require xCAT::Postage; my $args = $request->{arg}; + my @scriptcontents; if( defined($args) && grep(/version2/, @$args)) { - my @scriptcontents = xCAT::Postage::makescript([$client],$state,$callback); # the new method, use the template + @scriptcontents = xCAT::Postage::makescript([$client],$state,$callback); # the new method, use the template } else { #print "client:$client\n"; - my @scriptcontents = xCAT::Postage::makescript($client,$state,$callback); # the original method + @scriptcontents = xCAT::Postage::makescript($client,$state,$callback); # the original method } if (scalar(@scriptcontents)) { $rsp->{data} = \@scriptcontents;