force lpar shutdown if lpar is running Linux even user didn't specify -f option for getmacs/rnetboot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3355 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a4fcc7c2da
commit
8b72cc328e
@ -132,6 +132,36 @@ sub do_rnetboot {
|
||||
#######################################
|
||||
if ( exists( $opt->{f} )) {
|
||||
$cmd.= " -i";
|
||||
} else {
|
||||
#################################
|
||||
# Force LPAR shutdown if LPAR is
|
||||
# running Linux
|
||||
#################################
|
||||
my $table = "nodetype";
|
||||
my $intable = 0;
|
||||
my @TableRowArray = xCAT::DBobjUtils->getDBtable($table);
|
||||
if ( defined(@TableRowArray) ) {
|
||||
foreach ( @TableRowArray ) {
|
||||
my @nodelist = split(',', $_->{'node'});
|
||||
my @oslist = split(',', $_->{'os'});
|
||||
my $osname = "AIX";
|
||||
if ( grep(/^$node$/, @nodelist) ) {
|
||||
if ( !grep(/^$osname$/, @oslist) ) {
|
||||
$cmd.= " -i";
|
||||
}
|
||||
$intable = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
#################################
|
||||
# Force LPAR shutdown if LPAR OS
|
||||
# type is not specified in table
|
||||
# but mnt node is running Linux
|
||||
#################################
|
||||
if ( xCAT::Utils->isLinux() && $intable == 0 ) {
|
||||
$cmd.= " -i";
|
||||
}
|
||||
}
|
||||
|
||||
#######################################
|
||||
|
@ -245,7 +245,38 @@ sub do_getmacs {
|
||||
#######################################
|
||||
if ( exists( $opt->{f} )) {
|
||||
$cmd.= " -i";
|
||||
} else {
|
||||
#################################
|
||||
# Force LPAR shutdown if LPAR is
|
||||
# running Linux
|
||||
#################################
|
||||
my $table = "nodetype";
|
||||
my $intable = 0;
|
||||
my @TableRowArray = xCAT::DBobjUtils->getDBtable($table);
|
||||
if ( defined(@TableRowArray) ) {
|
||||
foreach ( @TableRowArray ) {
|
||||
my @nodelist = split(',', $_->{'node'});
|
||||
my @oslist = split(',', $_->{'os'});
|
||||
my $osname = "AIX";
|
||||
if ( grep(/^$node$/, @nodelist) ) {
|
||||
if ( !grep(/^$osname$/, @oslist) ) {
|
||||
$cmd.= " -i";
|
||||
}
|
||||
$intable = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
#################################
|
||||
# Force LPAR shutdown if LPAR OS
|
||||
# type is not assigned in table
|
||||
# but mnt node is running Linux
|
||||
#################################
|
||||
if ( xCAT::Utils->isLinux() && $intable == 0 ) {
|
||||
$cmd.= " -i";
|
||||
}
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Network specified (-D ping test)
|
||||
#######################################
|
||||
|
Loading…
Reference in New Issue
Block a user