From d825452bfcbfc442a926026aa09ea1505be27b5c Mon Sep 17 00:00:00 2001 From: Sims24 Date: Thu, 24 Sep 2015 16:11:01 +0200 Subject: [PATCH] Update hardware.pm, fix short output Wrong skip/total components display --- network/alcatel/common/mode/hardware.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/network/alcatel/common/mode/hardware.pm b/network/alcatel/common/mode/hardware.pm index 50cd3fe8e..182c0794e 100644 --- a/network/alcatel/common/mode/hardware.pm +++ b/network/alcatel/common/mode/hardware.pm @@ -118,7 +118,8 @@ sub component { # Skipping short msg when no components next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0); $total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip}; - $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name}; + my $count_by_components = $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip}; + $display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $count_by_components . ' ' . $self->{components}->{$comp}->{name}; $display_by_component_append = ', '; } @@ -199,4 +200,4 @@ If total (with skipped) is 0. (Default: 'critical' returns). =back -=cut \ No newline at end of file +=cut