From de597af8263292f265972dfe4971f1046f02657e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Sat, 14 Mar 2009 16:14:29 +0000 Subject: [PATCH] Further move some modules to lower memory git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2903 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 3 +-- xCAT-server/lib/xcat/plugins/getpostscript.pm | 2 +- xCAT-server/lib/xcat/plugins/sles.pm | 3 +-- xCAT-server/lib/xcat/plugins/windows.pm | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index db8c64bd2..657687830 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -12,8 +12,6 @@ use POSIX qw(WNOHANG nice); use xCAT::Table; use xCAT::Utils; use xCAT::MsgUtils; -use xCAT::Template; -#use xCAT::Postage; use Data::Dumper; use Getopt::Long; Getopt::Long::Configure("bundling"); @@ -411,6 +409,7 @@ sub mkinstall my %hents = %{$hmtab->getNodesAttribs(\@nodes, ['serialport', 'serialspeed', 'serialflow'])}; + require xCAT::Template; foreach $node (@nodes) { my $osinst; diff --git a/xCAT-server/lib/xcat/plugins/getpostscript.pm b/xCAT-server/lib/xcat/plugins/getpostscript.pm index e021669ab..9cd6b66b7 100644 --- a/xCAT-server/lib/xcat/plugins/getpostscript.pm +++ b/xCAT-server/lib/xcat/plugins/getpostscript.pm @@ -8,7 +8,6 @@ #------------------------------------------------------- package xCAT_plugin::getpostscript; -use xCAT::Postage; use xCAT::Utils; use xCAT::MsgUtils; use xCAT::NodeRange; @@ -66,6 +65,7 @@ sub process_request my $state; if ($request->{scripttype}) { $state = $request->{scripttype}->[0];} + require xCAT::Postage; my @scriptcontents = xCAT::Postage::makescript($client,$state,$callback); if (scalar(@scriptcontents)) { $rsp->{data} = \@scriptcontents; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index c3fc146ae..9a9ba7591 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -11,8 +11,6 @@ use File::Temp qw/tempdir/; use xCAT::Table; use xCAT::Utils; use xCAT::MsgUtils; -use xCAT::Template; -use xCAT::Postage; use Data::Dumper; use Getopt::Long; Getopt::Long::Configure("bundling"); @@ -261,6 +259,7 @@ sub mkinstall my $node; my $ostab = xCAT::Table->new('nodetype'); my %doneimgs; + require xCAT::Template; #only used here, load so memory can be COWed foreach $node (@nodes) { my $osinst; diff --git a/xCAT-server/lib/xcat/plugins/windows.pm b/xCAT-server/lib/xcat/plugins/windows.pm index 2c7590095..7ad14ca88 100644 --- a/xCAT-server/lib/xcat/plugins/windows.pm +++ b/xCAT-server/lib/xcat/plugins/windows.pm @@ -12,8 +12,6 @@ use xCAT::Table; use xCAT::Utils; use Socket; use xCAT::MsgUtils; -use xCAT::Template; -use xCAT::Postage; use Data::Dumper; use Getopt::Long; Getopt::Long::Configure("bundling"); @@ -204,6 +202,7 @@ sub mkinstall }); return; } + require xCAT::Template; foreach $node (@nodes) { my $osinst;