Removed smartctl ATA hardcoding.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 29 Aug 2009 17:20:13 +0000 (19:20 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 29 Aug 2009 17:20:13 +0000 (19:20 +0200)
New version autodetect also SATA and some USB bridges

src/initscripts/init.d/smartenabler
src/misc-progs/smartctrl.c
src/scripts/makegraphs

index 19403c8215c255ad357e5689a3c760b70d96714b..489560bd2c93b95b71041afe5a5e2b683158fa2a 100644 (file)
@@ -8,7 +8,7 @@ case "$1" in
        start)
                boot_mesg -n "Enabling S.M.A.R.T.: ";
                for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do 
-                   /usr/sbin/smartctl -d ata --smart=on /dev/$disk > /dev/nul;
+                   /usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
                    if [ ${?} = 0 ]; then 
                        boot_mesg -n "$SUCCESS$disk$NORMAL ";
                    else
index 6b2bd1e200a85cb7c2433d20f6914032db4087f6..5715fd7544010be6e680e741f1007cf8df65d376 100644 (file)
@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
                 exit(1);
        }
 
-        sprintf(command, "smartctl -iHA -d ata /dev/%s", argv[1]);
+        sprintf(command, "smartctl -iHA /dev/%s", argv[1]);
         safe_system(command);
 
         return 0;
index 817920ab734c0a416fd466afb892962a2fe1c422..c2baee7ccaf4cad0dbbc94a7af1577903711ca9f 100644 (file)
@@ -83,7 +83,7 @@ sub updatehdddata{
        if (!$standby){
                $temp = 0;
                my $smart_output = '';
-               system("$path_smartctl -iHA -d ata /dev/$disk > /var/run/smartctl_out_hddtemp-$disk");
+               system("$path_smartctl -iHA /dev/$disk > /var/run/smartctl_out_hddtemp-$disk");
                if ( -e "/var/run/smartctl_out_hddtemp-".$array[$#array] ){
                        my $hdd_output = `cat /var/run/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`;
                        my @t = split(/\s+/,$hdd_output);