]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/smartenabler
Removed smartctl ATA hardcoding.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / smartenabler
index 1bf071d1e4797825e985bc8103c711f85008ead4..489560bd2c93b95b71041afe5a5e2b683158fa2a 100644 (file)
@@ -6,11 +6,17 @@
 
 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 
-                 boot_mesg "Enabling S.M.A.R.T. for $disk ...";
-                 /usr/sbin/smartctl -d ata --smart=on /dev/$disk > /dev/nul;
-                 evaluate_retval;
+                   /usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
+                   if [ ${?} = 0 ]; then 
+                       boot_mesg -n "$SUCCESS$disk$NORMAL ";
+                   else
+                       boot_mesg -n "$WARNING$disk$NORMAL ";
+                   fi
                done
+               boot_mesg;
+               echo_ok;
                ;;
 
        *)