From 381db5eb17cfbc34254dfce8d8c7a3c21420c132 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 6 Feb 2018 10:53:15 +0100 Subject: [PATCH] Fix mdadm RAID discovery condition --- zabbix_scripts/disco_raid_mdadm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix_scripts/disco_raid_mdadm b/zabbix_scripts/disco_raid_mdadm index d4c6b0f..d9f2684 100644 --- a/zabbix_scripts/disco_raid_mdadm +++ b/zabbix_scripts/disco_raid_mdadm @@ -6,7 +6,7 @@ use JSON; my $json; @{$json->{data}} = (); -if (-x '/bin/systemd-detect-virt' && system('/bin/systemd-detect-virt', '-qc') != 0){ +if (!-x '/usr/bin/systemd-detect-virt' || system('/usr/bin/systemd-detect-virt', '-qc') != 0){ open FILE, "< /proc/mdstat" or die "Can't open /proc/mdadm : $!"; foreach my $line () { next unless ($line =~ m/^(md\d+)+\s*:/);