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

@@ -96,6 +96,7 @@ $(TARGET) :
ln -sf ../init.d/swap /etc/rc.d/rc0.d/S90swap
ln -sf ../init.d/halt /etc/rc.d/rc0.d/S99halt
ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd
ln -sf ../init.d/smartenabler /etc/rc.d/rc3.d/S19smartenabler
ln -sf ../init.d/sysklogd /etc/rc.d/rc6.d/K90sysklogd
ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs

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