From 3f54b456d2f2479489386b9291fa1867dd22c32d Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 6 May 2016 11:28:04 -0400 Subject: [PATCH] Overwriting the -u option passed in to bmcdiscover command was only getting executed under a test for the -p option. Move the check outside so we overlay the default if any option is specified --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; - } } #########################################