Magellan Linux

Annotation of /trunk/hdparm/hdparm.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 45 - (hide annotations) (download)
Sun Oct 16 20:40:44 2005 UTC (18 years, 6 months ago) by niro
File size: 733 byte(s)
new hdparm rc-script

1 niro 45 #!/bin/bash
2     # $Header: /root/magellan-cvs/src/hdparm/hdparm.rc,v 1.1 2005-10-16 20:40:44 niro Exp $
3    
4     #%rlevels: 7:s
5     #%start: 54
6     #%stop:
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/sysconfig/rc
14     source $rc_functions
15    
16     if [ ! -x /sbin/hdparm ]
17     then
18     echo "Please install sys-apps/hdparm"
19     exit 1
20     fi
21    
22     if [ ! -f /etc/conf.d/hdparm ]
23     then
24     echo "/etc/conf.d/hdparm is missing ... "
25     exit 1
26     fi
27    
28     (cat /etc/conf.d/hdparm; echo) | # make sure there is a LF at the end
29     while read disk args
30     do
31     case "${disk}" in
32     \#*|"") continue ;;
33     esac
34     echo -e ${COLOREDSTAR}"Setting hdd params for ${COLBLUE}${disk}${COLDEFAULT} ..."
35     hdparm ${args} ${disk} &> /dev/null
36     evaluate_retval
37     done
38    
39     update_svcstatus $1
40     splash svc_started "$(basename $0)" 0