mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
Merge pull request #2445 from cxhong/2441
xdsh doesn't read credentials from the passwd table for IBSwitch
This commit is contained in:
commit
f2c691ea1a
@ -979,8 +979,9 @@ sub fork_fanout_dsh
|
||||
)
|
||||
= @_;
|
||||
|
||||
#get username and passeword for ether net switches (EthSwitch type)
|
||||
if ($$options{'devicetype'} =~ /EthSwitch/) {
|
||||
#get username and passeword for switches
|
||||
if (($$options{'devicetype'} =~ /EthSwitch/) ||
|
||||
(($$options{'devicetype'} =~ /IBSwitch/) && !($$options{'user'})) ){
|
||||
if (@$targets_waiting > 0) {
|
||||
if ($ENV{'DSH_REMOTE_PASSWORD'}) {
|
||||
foreach my $t (keys(%$resolved_targets)) {
|
||||
@ -1010,13 +1011,15 @@ sub fork_fanout_dsh
|
||||
if (defined($entry->[0]->{protocol})) {
|
||||
$protocol = $entry->[0]->{protocol};
|
||||
}
|
||||
if ((!$username) && (!$password) && (!$protocol)) { #use passwd table as default
|
||||
if ((!$username) && (!$password)) { #use passwd table as default
|
||||
if (defined($passwd_ent[0]->{username})) {
|
||||
$username = $passwd_ent[0]->{username};
|
||||
}
|
||||
if (defined($passwd_ent[0]->{password})) {
|
||||
$password = $passwd_ent[0]->{password};
|
||||
}
|
||||
}
|
||||
if (!$protocol){
|
||||
if (defined($passwd_ent[0]->{comments}) && ($passwd_ent[0]->{comments} eq "telnet")) {
|
||||
$protocol = $passwd_ent[0]->{comments};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user