Initscript to enable smart for all disks. (not added to core x yet)

git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1186 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
arne_f
2008-02-07 10:31:42 +00:00
parent 8c55860fff
commit d7fb75d9e3
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# Begin $rc_base/init.d/smartenabler
. /etc/sysconfig/rc
. $rc_functions
case "$1" in
start)
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 --smart=on /dev/$disk > /dev/nul;
evaluate_retval;
done
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac
# End $rc_base/init.d/smartenabler