diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 5b96a7a10..f23fe5fcb 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -206,11 +206,11 @@ sub bmcdiscovery_processargs { # ($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; - if ($::opt_U) { - $bmc_user = $::opt_U; - } } #########################################