File enable_auto_interface.patch of Package monitoring-plugins-smart
--- check_smart.orig 2014-03-28 21:55:34.000000000 +0100
+++ check_smart 2014-06-24 17:07:22.893429945 +0200
@@ -66,7 +66,7 @@
# This patch enables check_smart to test disks on Adaptec RAID controllers via SAT interface
# See: http://www.cyberciti.biz/faq/linux-checking-sas-sata-disks-behind-adaptec-raid-controllers/
- if(grep {$opt_i eq $_} ('ata', 'scsi', 'megaraid', 'sat')){
+ if(grep {$opt_i eq $_} ('ata', 'scsi', 'megaraid', 'sat', 'auto')){
$interface = $opt_i;
if($interface eq 'megaraid'){
if(defined($opt_n)){
@@ -212,7 +212,7 @@
# separate metric-gathering and output analysis for ATA vs SCSI SMART output
# This patch enables check_smart to test disks via SAT interface
-if ($interface eq 'ata' or $interface eq 'sat'){
+if ($interface eq 'ata' or $interface eq 'sat' or $interface eq 'auto'){
foreach my $line(@output){
# get lines that look like this:
# 9 Power_On_Minutes 0x0032 241 241 000 Old_age Always - 113h+12m
@@ -309,11 +309,11 @@
sub print_help {
print_revision($basename,$revision);
- print "Usage: $basename (--device=<SMART device> --interface=(ata|sat|scsi|megaraid)|-h|-v) [--debug]\n";
+ print "Usage: $basename (--device=<SMART device> --interface=(ata|sat|scsi|megaraid|auto)|-h|-v) [--debug]\n";
print " --debug: show debugging information\n";
print " -d/--device: a device to be SMART monitored, eg /dev/sda\n";
- print " -i/--interface: ata, sat, scsi, megaraid, depending upon the device's interface type\n";
- print " -n/--number: where in the argument megaraid, it is the physical disk number within the MegaRAID controller\n";
+ print " -i/--interface: ata, sat, scsi, megaraid, or auto depending upon the device's interface type\n";
+ print " -n/--number: where in the argument megaraid, it is the physical disk number within the MegaRAID controller\n";
print " -h/--help: this help\n";
print " -v/--version: Version number\n";
support();