From 515a03e7910559cf8d5ece2e4973ae9abf0ce7bf Mon Sep 17 00:00:00 2001 From: Boris HUISGEN Date: Mon, 5 Jul 2010 12:25:32 +0200 Subject: [PATCH] Add FreeBSD support --- plugins/other/hddtemp_smartctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/other/hddtemp_smartctl b/plugins/other/hddtemp_smartctl index 55994ff7..11a47377 100755 --- a/plugins/other/hddtemp_smartctl +++ b/plugins/other/hddtemp_smartctl @@ -101,7 +101,11 @@ $ENV{LC_ALL} = 'C'; my @drives; # Try to get a default set of drives -if ($^O eq 'linux') { +if ($^O eq 'freebsd') { + opendir(DEV, '/dev'); + @drives = grep /ad|da$/, readdir DEV; + closedir(DEV); +} elsif ($^O eq 'linux') { # On Linux, we know how to enumerate ide drives. # SCSI is not as easy if (-d '/dev') {