]>
Commit | Line | Data |
---|---|---|
d7fb75d9 AF |
1 | #!/bin/sh |
2 | # Begin $rc_base/init.d/smartenabler | |
3 | ||
4 | . /etc/sysconfig/rc | |
5 | . $rc_functions | |
6 | ||
7 | case "$1" in | |
8 | start) | |
5c819ec4 | 9 | boot_mesg -n "Enabling S.M.A.R.T.: "; |
d7fb75d9 | 10 | for disk in `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; do |
bf97c674 | 11 | /usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul; |
5c819ec4 AF |
12 | if [ ${?} = 0 ]; then |
13 | boot_mesg -n "$SUCCESS$disk$NORMAL "; | |
14 | else | |
15 | boot_mesg -n "$WARNING$disk$NORMAL "; | |
16 | fi | |
d7fb75d9 | 17 | done |
5c819ec4 AF |
18 | boot_mesg; |
19 | echo_ok; | |
d7fb75d9 AF |
20 | ;; |
21 | ||
22 | *) | |
23 | echo "Usage: $0 {start}" | |
24 | exit 1 | |
25 | ;; | |
26 | esac | |
27 | ||
28 | # End $rc_base/init.d/smartenabler |