diff --git a/status.cgi b/status.cgi index 61a7c35..db5d8ce 100755 --- a/status.cgi +++ b/status.cgi @@ -26,7 +26,7 @@ my %status = zpool_status($in{'pool'}); #print "Config:"; print ui_columns_start([ "Virtual Device", "State", "Read", "Write", "Cksum" ]); #@devs = ( values %status{}{devs} ); -foreach $key (sort keys %status) +foreach $key (sort {$a <=> $b} (keys %status)) { if (($status{$key}{parent} =~ /pool/) && ($key != 0)) { print ui_columns_row(["".$status{$key}{name}."", $status{$key}{state}, $status{$key}{read}, $status{$key}{write}, $status{$key}{cksum}]);