Magellan Linux

Annotation of /trunk/hdparm/hdparm.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (hide annotations) (download)
Sun Oct 16 20:49:38 2005 UTC (18 years, 7 months ago) by niro
File size: 767 byte(s)
more infos

1 niro 45 #!/bin/bash
2 niro 46 # $Header: /root/magellan-cvs/src/hdparm/hdparm.rc,v 1.2 2005-10-16 20:49:38 niro Exp $
3 niro 45
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 niro 46 echo -en ${COLOREDSTAR}"Setting hdd params ${COLBLUE}'${args}'${COLDEFAULT} for ${COLBLUE}${disk}${COLDEFAULT} ..."
35 niro 45 hdparm ${args} ${disk} &> /dev/null
36     evaluate_retval
37     done
38    
39     update_svcstatus $1
40     splash svc_started "$(basename $0)" 0