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) {