#!/bin/sh # Source function library . /etc/rc.d/init.d/functions # Get service config [ -f /etc/sysconfig/hdparm ] && . /etc/sysconfig/hdparm for drive in $(ls /proc/ide 2> /dev/null); do if [ -L "/proc/ide/${drive}" ]; then eval PARAMS=\$HDPARM_${drive} if [ -n "${PARAMS}" ] ; then show "Setting parameters for drive %s" "$drive" busy /sbin/hdparm ${PARAMS} /dev/${drive} deltext ok fi fi done exit 0