3 # Source function library
4 . /etc/rc.d/init.d/functions
7 [ -f /etc/sysconfig/hdparm ] && . /etc/sysconfig/hdparm
9 if [ -c /dev/.devfsd ]; then
10 # we have devfs enabled kernel
11 DRIVES=$(ls -1 /dev/hd* /dev/sd* 2> /dev/null | \
12 awk -F'/' ' ! /[0-9]$/ { print $3; }')
14 DRIVES="`awk '!($NF ~ /md|name/) { print $NF }' /proc/partitions`"
17 for drive in $DRIVES; do
18 eval PARAMS=\$HDPARM_${drive}
19 if [ -n "${PARAMS}" ] ; then
20 show "Setting parameters for drive %s" "$drive"
22 /sbin/hdparm ${PARAMS} /dev/$drive