Debian Codegraph @

debian/patches/check_raid/sort_megacli_numerical

raw
1 Incorporate changes from https://github.com/glensc/nagios-plugin-check_raid/commit/2a05ecb2b219a5f102acb81d9bd6aeabb664d434
2 Index: pkg-nagios-plugins-contrib/check_raid/check_raid
3 ===================================================================
4 --- pkg-nagios-plugins-contrib.orig/check_raid/check_raid
5 +++ pkg-nagios-plugins-contrib/check_raid/check_raid
6 @@ -4057,7 +4057,7 @@ $fatpacked{"App/Monitoring/Plugin/CheckR
7 }
8
9 my %dstatus;
10 - foreach my $dev (@{$c->{physical}}) {
11 + foreach my $dev (sort {$a->{dev} <=> $b->{dev}} @{$c->{physical}}) {
12 if ($dev->{state} eq 'Online' || $dev->{state} eq 'Hotspare' || $dev->{state} eq 'Unconfigured(good)' || $dev->{state} eq 'JBOD') {
13 push(@{$dstatus{$dev->{state}}}, sprintf "%02d", $dev->{dev});
14