fix bug 3519426: FB:rspconfig network=ip,host,gateway,netmask can't work

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12541 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-05-07 07:02:56 +00:00
parent 096681629d
commit 9b335ce93c
5 changed files with 21 additions and 6 deletions

View File

@ -145,7 +145,9 @@ sub getIPaddress
my $vpd = $request->{vpd};
# only need to parse IP addresses for Frame/CEC/BPA/FSP
if ($type eq "lpar") {
$type = xCAT::DBobjUtils->getnodetype($nodetocheck);
}
#my $type = xCAT::DBobjUtils->getnodetype($nodetocheck);
#my $type = $$attrs[4];
if ($type) {

View File

@ -261,7 +261,7 @@ sub rflash {
my $frame = $$d[5];
my $type = xCAT::DBobjUtils->getnodetype($frame);
if ( ( $frame ne $name ) && ( $type eq "frame" ) ){
if ( ( $frame ne $name ) && ( $type eq "frame" ) && $activate !~ /^deferred$/){
my @frame_d = (0, 0, 0, $frame, "frame", 0);
$action = "list_firmware_level";
@ -327,7 +327,8 @@ sub rflash {
if($housekeeping =~ /^commit$/) { $action = "code_commit"}
if($housekeeping =~ /^recover$/) { $action = "code_reject"}
if($activate =~ /^disruptive$/) {
if($housekeeping =~ /^bpa_acdl$/) { $action = "acdl"}
if($activate =~ /^(disruptive|deferred)$/) {
$action = "code_update";
}
if($activate =~ /^concurrent$/) {

View File

@ -94,7 +94,7 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s d=s activate=s commit recover) )) {
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s d=s activate=s commit recover bpa_acdl) )) {
return( usage() );
}
@ -112,6 +112,11 @@ sub parse_args {
#################################
#Option --activate not valid with --commit or --recover
#################################
if (exists($opt{bpa_acdl}) && (exists($opt{activate}) || exists($opt{commit}) ||
exists($opt{recover}) || exists($opt{p}) || exists($opt{d}))) {
return ( usage("Option --bpa_acdl not valid with other options "));
}
if( exists( $opt{activate} ) && (exists( $opt{commit}) || exists( $opt{recover}))) {
return( usage("Option --activate not valid with --commit or --recover ") );
}
@ -181,6 +186,9 @@ sub parse_args {
} elsif( defined( $opt{ recover }) ) {
print "recover flag\n";
$housekeeping = "recover";
} elsif (defined( $opt{ bpa_acdl})) {
print "bpa_acdl flag\n";
$housekeeping = "bpa_acdl";
} else {
print "no housekeeping - update mode\n";
$housekeeping = undef;

View File

@ -268,8 +268,9 @@ my %usage = (
rflash <noderange> -p <rpm_directory> [--activate concurrent | disruptive][-V|--verbose]
rflash <noderange> [--commit | --recover] [-V|--verbose]
PPC (using Direct FSP Management) specific:
rflash <noderange> -p <rpm_directory> --activate disruptive [-d <data_directory>]
rflash <noderange> [--commit | --recover] [-V|--verbose]",
rflash <noderange> -p <rpm_directory> [--activate disruptive | deferred] [-d <data_directory>]
rflash <noderange> [--commit | --recover] [-V|--verbose]
rflash <noderange> [--bpa_acdl]",
"mkhwconn" =>
"Usage:
mkhwconn [-h|--help]

View File

@ -4373,6 +4373,9 @@ sub network {
if (!$ip and !$host and !$gateway and !$mask) {
return([1,"No changes specified"]);
}
if ($mpa ne $node) {
$host = undef;
}
}
else {
if ( $value !~ /^\*$/) {