mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
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:
@@ -96,6 +96,7 @@ $(TARGET) :
|
|||||||
ln -sf ../init.d/swap /etc/rc.d/rc0.d/S90swap
|
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/halt /etc/rc.d/rc0.d/S99halt
|
||||||
ln -sf ../init.d/sysklogd /etc/rc.d/rc3.d/S10sysklogd
|
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/sysklogd /etc/rc.d/rc6.d/K90sysklogd
|
||||||
ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
|
ln -sf ../init.d/sendsignals /etc/rc.d/rc6.d/S60sendsignals
|
||||||
ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs
|
ln -sf ../init.d/mountfs /etc/rc.d/rc6.d/S70mountfs
|
||||||
|
|||||||
22
src/initscripts/init.d/smartenabler
Normal file
22
src/initscripts/init.d/smartenabler
Normal 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
|
||||||
Reference in New Issue
Block a user