#!/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 `ls -1 /sys/block | grep -E '^sd' | sort | uniq`; do /usr/sbin/smartctl --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