2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-15 19:01:44 +00:00

Seems like for discovery of FSP and TUL servers, there is no bmcuser

name so adding the code from commit 3f54b456d2
and d82e14b566 to set the default user breaks
that function.  Reverting back to the old ways
This commit is contained in:
Victor Hu
2016-08-30 13:42:21 -04:00
parent c149f10c78
commit 6133755f27

View File

@ -204,24 +204,19 @@ sub bmcdiscovery_processargs {
return 1;
}
#
# Get the default bmc account from passwd table
#
($bmc_user, $bmc_pass) = bmcaccount_from_passwd();
# overwrite the default user/pass with what is passed in
if ($::opt_U) {
$bmc_user = $::opt_U;
}
if ($::opt_P) {
$bmc_pass = $::opt_P;
}
#########################################
# Option -s -r should be together
######################################
if (defined($::opt_R))
{
# Option -c should not be used with -r
if (defined($::opt_C)) {
my $msg = "The 'check' and 'range' option cannot be used together.";
my $rsp = {};
push @{ $rsp->{data} }, "$msg";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
return 2;
}
######################################
# check if there is nmap or not
######################################
@ -240,6 +235,24 @@ sub bmcdiscovery_processargs {
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
return 1;
}
#
# Get the default bmc account from passwd table, this is only done for the
# discovery process
#
($bmc_user, $bmc_pass) = bmcaccount_from_passwd();
# overwrite the default password if one is provided
if ($::opt_U) {
$bmc_user = $::opt_U;
} else {
# If password is provided, but no user, set the user to blank
# Support older FSP and Tuletta machines
$bmc_user = '';
}
if ($::opt_P) {
$bmc_pass = $::opt_P;
}
scan_process($::opt_M, $::opt_R, $::opt_Z, $::opt_W, $request_command);
return 0;
}