From e9e3f06d30f60ab6a1c6c135fc93e741fe6982af Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 7 Feb 2012 06:11:28 +0000 Subject: [PATCH] for rflash on linux hierachical, if the installloc in the site table isn't set, copy the rpms to the service node git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11495 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 11700310d..69b9bda47 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1932,13 +1932,21 @@ sub preprocess_request { #print "nodes=@nodes\n"; push @requests, $reqcopy; - if(($req->{command}->[0] eq "rflash") && ( exists( $req->{opt}->{activate} ) ) && xCAT::Utils->isAIX() ) { - if ( $masters[0] ne $snkey ) { + if(($req->{command}->[0] eq "rflash") && ( exists( $req->{opt}->{activate} ) ) ) { + my $linuxrequired = 0; + if ( xCAT::Utils->isLinux() ) { + my @installloc = xCAT::Utils->get_site_attribute("installloc"); + if (! ($installloc[0])) { + $linuxrequired = 1; + } + } + + if ( ($linuxrequired || xCAT::Utils->isAIX()) && ( $masters[0] ne $snkey )) { my $install_dir = xCAT::Utils->getInstallDir(); - my $cmd = "$::XCATROOT/bin/xdcp $snkey -P -R $install_dir/packages_fw $install_dir/"; + my $cmd = "$::XCATROOT/bin/xdcp $snkey -R $install_dir/packages_fw $install_dir/"; my $result = xCAT::Utils->runcmd("$cmd", -1); if ($::RUNCMD_RC != 0) { - $callback->({data=>["Could not copy rpms in the $install_dir/packages_fw to $snkey.\n"]}); + $callback->({data=>["$result. Could not copy rpms in the $install_dir/packages_fw to $snkey.\n"]}); $req = {}; return; }