From 708cdf27476d3b8d0b4cc491d1a292efa747d9fd Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 22 Apr 2013 19:25:24 +0200 Subject: [PATCH] Skip block which won't support smart data --- zabbix_scripts/disco_smart_sudo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zabbix_scripts/disco_smart_sudo b/zabbix_scripts/disco_smart_sudo index c139bf1..b495682 100644 --- a/zabbix_scripts/disco_smart_sudo +++ b/zabbix_scripts/disco_smart_sudo @@ -13,6 +13,8 @@ closedir($dh); foreach my $block (@blocks){ my $removable = 0; my $size = 1; + # Skip block we already know they won't support SMART + next if ($block =~ m/^(ram|loop|md|dm\-)\d+/); if ( -e "/sys/block/$block/removable"){ open REMOVABLE, "/sys/block/$block/removable"; $removable = join "", ;