Fix uninitialized $remouvable var

tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 9 years ago
parent 6f52ff1fab
commit f5a7ebdfed
  1. 2
      lib/Zabbix/Agent/Addons/Disks.pm

@ -33,7 +33,7 @@ sub list_smart_hdd{
next unless (system("/usr/sbin/smartctl -A /dev/$block >/dev/null 2>&1") == 0); next unless (system("/usr/sbin/smartctl -A /dev/$block >/dev/null 2>&1") == 0);
if ($param->{skip_remouvable} && -e "/sys/block/$block/removable"){ if ($param->{skip_remouvable} && -e "/sys/block/$block/removable"){
open REMOVABLE, "/sys/block/$block/removable"; open REMOVABLE, "/sys/block/$block/removable";
$removable = join "", <REMOVABLE>; my $removable = join "", <REMOVABLE>;
close REMOVABLE; close REMOVABLE;
chomp($removable); chomp($removable);
next if ($removable eq '1'); next if ($removable eq '1');

Loading…
Cancel
Save