From 7a8d431650b1be81112c5e8e971f942d51eaecc1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 2 May 2017 10:49:39 -0400 Subject: [PATCH] Initialize IPMI variables earlier In some scenarios, an IPMI instance could be called to handle data earlier than it should. Ensure the state of the object is in adequate shape to react as soon as possible. --- xCAT-server/lib/perl/xCAT/IPMI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/IPMI.pm b/xCAT-server/lib/perl/xCAT/IPMI.pm index d7223dc6b..54d33289a 100644 --- a/xCAT-server/lib/perl/xCAT/IPMI.pm +++ b/xCAT-server/lib/perl/xCAT/IPMI.pm @@ -181,6 +181,7 @@ sub new { my $self = {}; bless $self, $class; my %args = @_; + $self->init(); unless ($ipmi2support) { $self->{ipmi15only} = 1; } @@ -238,7 +239,6 @@ sub new { } else { $self->{peeraddr} = sockaddr_in($self->{port}, $bmc_n); } - $self->init(); return $self; }