From 50feb83e568008e0e9fc46a1f854c5cec4aaf5af Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Thu, 2 Aug 2012 06:47:54 +0000 Subject: [PATCH] fix bug about 'hwtype' string changing into a string array in hierarchical environment. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13396 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 161dfadfb..e871c5e11 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1774,9 +1774,6 @@ sub runcmd { my $cmd = $request->{command}; my $method = $request->{method}; my $hwtype = $request->{hwtype}; - if (ref($hwtype) eq 'ARRAY') { - $hwtype = @$hwtype[0]; - } #my $modname = $modules{$cmd}; my $modname = $modules{$cmd}{$hwtype}; @@ -2163,6 +2160,7 @@ sub process_request { $request->{stdin} = $req->{stdin}->[0]; $request->{method} = $req->{method}->[0]; $request->{op} = $req->{op}->[0]; + $request->{enableASMI} = $req->{enableASMI}; #support more options in hierachy if( ref( $req->{opt}) eq 'ARRAY' ) { @@ -2172,9 +2170,12 @@ sub process_request { $t{$k} = $h->{$k}->[0]; } $request->{opt} = \%t; - } + } + if (ref($req->{hwtype}) eq 'ARRAY') { + $request->{hwtype} = $req->{hwtype}->[0]; + } -# $request->{hwtype} = $package; +# $request->{hwtype} = $package; $request->{callback}= $callback; $request->{subreq} = $subreq; #########################