-Have getbmcconfig relay bmcport if set
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2825 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8c7ae96988
commit
c2a12fa657
@ -109,13 +109,17 @@ sub process_request {
|
||||
if ($tmphash->{value} eq "1" or $tmphash->{value} =~ /y(es)?/i) {
|
||||
$password = genpassword(8);
|
||||
$gennedpassword=1;
|
||||
$tmphash=$ipmitable->getNodeAttribs($node,['bmc','username']);
|
||||
} else {
|
||||
$tmphash=$ipmitable->getNodeAttribs($node,['password']);
|
||||
$tmphash=$ipmitable->getNodeAttribs($node,['bmc','username','bmcport','password']);
|
||||
if ($tmphash->{password}) {
|
||||
$password = $tmphash->{password};
|
||||
}
|
||||
}
|
||||
$tmphash=$ipmitable->getNodeAttribs($node,['bmc','username']);
|
||||
my $bmcport;
|
||||
if (defined $tmphash->{bmcport}) {
|
||||
$bmcport = $tmphash->{bmcport};
|
||||
}
|
||||
if ($tmphash->{bmc} ) {
|
||||
$bmc=$tmphash->{bmc};
|
||||
}
|
||||
@ -129,6 +133,9 @@ sub process_request {
|
||||
}
|
||||
(my $ip,my $mask,my $gw) = net_parms($bmc);
|
||||
my $response={bmcip=>$ip,netmask=>$mask,gateway=>$gw,username=>$username,password=>$password};
|
||||
if (defined $bmcport) {
|
||||
$response->{bmcport}=$bmcport;
|
||||
}
|
||||
$callback->($response);
|
||||
if ($gennedpassword) { # save generated password
|
||||
$ipmitable->setNodeAttribs($node,{password=>$password});
|
||||
|
Loading…
Reference in New Issue
Block a user