initialize an empty array in disco_block_devices

tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 12 years ago
parent 40241f2fb8
commit 54ffe7c67c
  1. 1
      zabbix_scripts/disco_block_devices

@ -6,6 +6,7 @@ opendir(my $dh, "/sys/block") or die "Couldn't open /sys/block: $!";
my @blocks = grep { $_ !~ m/^\./ } readdir($dh); my @blocks = grep { $_ !~ m/^\./ } readdir($dh);
closedir($dh); closedir($dh);
my $json; my $json;
@{$json->{data}} = ();
foreach my $block (@blocks){ foreach my $block (@blocks){
my $removable = 0; my $removable = 0;
my $size = 1; my $size = 1;

Loading…
Cancel
Save