Files
bpfire/src/initscripts/init.d/smartenabler
arne_f 5c819ec4c5 removed fail's if mbmon cannot start
changed the output of smartenables if devices not support smart



git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1194 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2008-02-10 11:33:29 +00:00

29 lines
556 B
Bash

#!/bin/sh
# Begin $rc_base/init.d/smartenabler
. /etc/sysconfig/rc
. $rc_functions
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;
if [ ${?} = 0 ]; then
boot_mesg -n "$SUCCESS$disk$NORMAL ";
else
boot_mesg -n "$WARNING$disk$NORMAL ";
fi
done
boot_mesg;
echo_ok;
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac
# End $rc_base/init.d/smartenabler