From c0bbce36da042b95d5a5e30710d17074baf2d077 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 bb332bb13..e1322c4c9 100644 --- a/xCAT-server/lib/perl/xCAT/IPMI.pm +++ b/xCAT-server/lib/perl/xCAT/IPMI.pm @@ -123,6 +123,7 @@ sub new { my $self = {}; bless $self, $class; my %args = @_; + $self->init(); unless ($ipmi2support) { $self->{ipmi15only} = 1; } @@ -180,7 +181,6 @@ sub new { } else { $self->{peeraddr} = sockaddr_in($self->{port}, $bmc_n); } - $self->init(); return $self; }