- if ( -e "$path_hddtemp" ){
- $hdd_output = `$path_hddtemp -qn /dev/$disk`;
- # I know 4 response possible responses:
- #
- # /dev/harddisk: harddisk type: S.M.A.R.T. not available
- # /dev/harddisk: harddisk type: no sensor
- # /dev/harddisk: harddisk type: 37?C or ?F
- # 37
-
- if ( index($hdd_output, "S.M.A.R.T.") != -1 ){$temp = 0;}
- elsif ( index($hdd_output, "no sensor") != -1 ){$temp = 1;}
- elsif ( index($hdd_output, "$disk") != -1 ){my @temp = split(/:/,$hdd_output);$temp[2] =~ s/\D//gi;$temp = $temp[2];}
- else{$hdd_output =~ /(\d+)\s/;$temp = $1;}
- }
- elsif ( -e "/var/log/smartctl_out_hddtemp-".$array[$#array] ){
- $hdd_output = `cat /var/log/smartctl_out_hddtemp-".$array[$#array]." | grep Temperature_`;
+ if ( -e "/var/log/smartctl_out_hddtemp-".$array[$#array] ){
+ $hdd_output = `cat /var/log/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`;