diff --git a/xCAT-server/lib/xcat/plugins/switchdiscover.pm b/xCAT-server/lib/xcat/plugins/switchdiscover.pm index 8d90f8024..12e552556 100644 --- a/xCAT-server/lib/xcat/plugins/switchdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/switchdiscover.pm @@ -459,7 +459,7 @@ sub process_request { if ($key !~ /nomac/) { $mac = $key; } - my $msg = sprintf $format, $ip, $name, $vendor, $key; + my $msg = sprintf $format, $ip, $name, $vendor, $mac; send_msg(\%request, 0, $msg); } } @@ -1363,11 +1363,7 @@ sub switchsetup { my $outhash = shift; my $request = shift; my $sub_req = shift; - my $ret; my @switchnode = (); - my $switchInfo; - my $output; - my $dshcmd; my $static_ip; my $discover_switch; my $nodes_to_config; diff --git a/xCAT-server/share/xcat/tools/configBNT b/xCAT-server/share/xcat/tools/configBNT index e3b3d62cc..13b8f67f5 100755 --- a/xCAT-server/share/xcat/tools/configBNT +++ b/xCAT-server/share/xcat/tools/configBNT @@ -327,9 +327,7 @@ sub config_snmp { if (@config_switches) { #update switch status my $csw = join(",",@config_switches); - $cmd = "chdef $csw status=switch_configed" ; - $rc= xCAT::Utils->runcmd($cmd, 0); - $cmd = "chtab switch=$csw switches.snmpversion=3 switches.auth=sha switches.username=$snmp_user switches.password=$snmp_passwd" ; + $cmd = "chdef $csw status=switch_configed snmpversion=3 snmpauth=sha snmpusername=$snmp_user snmppassword=$snmp_passwd"; $rc= xCAT::Utils->runcmd($cmd, 0); } } diff --git a/xCAT-server/share/xcat/tools/configMellanox b/xCAT-server/share/xcat/tools/configMellanox index bc3bfc7c2..2af72ec18 100755 --- a/xCAT-server/share/xcat/tools/configMellanox +++ b/xCAT-server/share/xcat/tools/configMellanox @@ -78,7 +78,7 @@ if ($::SWITCH) exit(1); } } else { - xCAT::MsgUtils->message("E","Invalid flag, please provide switches with --range"); + xCAT::MsgUtils->message("E","Invalid flag, please provide switches with --switches"); &usage; exit(1); } @@ -248,10 +248,10 @@ sub usage { print "Usage: configMellonax [-?│-h│--help] - configMellonax [--range switchnames] [--all] - configMellonax [--range switchnames] [--ip] - configMellonax [--range switchnames] [--name] - configMellonax [--range switchnames] [--config] + configMellonax [--switches switchnames] [--all] + configMellonax [--switches switchnames] [--ip] + configMellonax [--switches switchnames] [--name] + configMellonax [--switches switchnames] [--config] \n"; }