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 commit3f54b456d2
andd82e14b566
to set the default user breaks that function. Reverting back to the old ways
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user