#!/bin/bash # $Header: /root/magellan-cvs/src/hdparm/hdparm.rc,v 1.3 2005-10-16 20:52:24 niro Exp $ #%rlevels: 7:s #%start: 54 #%stop: #deps #%needs: #%before: #%after: source /etc/sysconfig/rc source $rc_functions if [ ! -x /sbin/hdparm ] then echo "Please install sys-apps/hdparm" exit 1 fi if [ ! -f /etc/conf.d/hdparm ] then echo "/etc/conf.d/hdparm is missing ... " exit 1 fi (cat /etc/conf.d/hdparm; echo) | # make sure there is a LF at the end while read disk args do case "${disk}" in \#*|"") continue ;; esac echo -e ${COLOREDSTAR}"Setting hdd params ${COLBLUE}'${args}'${COLDEFAULT} for ${COLBLUE}${disk}${COLDEFAULT} ..." hdparm ${args} ${disk} &> /dev/null evaluate_retval done update_svcstatus $1 splash svc_started "$(basename $0)" 0