From 1ca20fe313cceb5da4cd08c1c6890e2440db4b21 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 13 Dec 2011 07:19:31 +0000 Subject: [PATCH] fixed defect 3458235, get_compatible_version_from_rpm also will check the directory of the firmware files git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11228 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPUtils.pm | 2 +- perl-xCAT/xCAT/PPCrflash.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index 289af4435..02be7210f 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -146,7 +146,7 @@ sub fsp_api_action { my $cmd; my $install_dir = xCAT::Utils->getInstallDir(); - if( $action =~ /^code_update$/) { + if( $action =~ /^(code_update|get_compatible_version_from_rpm)$/) { $cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter -d $install_dir/packages_fw/"; } elsif($action =~ /^add_connection$/) { $cmd = "$fsp_api -a $action -u $user -p $password -T $tooltype -t $type:$fsp_ip:$id:$node_name:"; diff --git a/perl-xCAT/xCAT/PPCrflash.pm b/perl-xCAT/xCAT/PPCrflash.pm index 10472864c..976f37932 100644 --- a/perl-xCAT/xCAT/PPCrflash.pm +++ b/perl-xCAT/xCAT/PPCrflash.pm @@ -360,7 +360,7 @@ sub preprocess_for_rflash { my $cmd; if( -d $packages_fw) { - $cmd = "rm -rf $packages_fw"; + $cmd = "rm -rf $packages_fw/*"; xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { @@ -371,7 +371,7 @@ sub preprocess_for_rflash { } } - $cmd = "mkdir $packages_fw"; + $cmd = "mkdir -p $packages_fw"; xCAT::Utils->runcmd("$cmd", 0); if ($::RUNCMD_RC != 0) {