]> git.pld-linux.org Git - packages/hdparm.git/blame - hdparm.init
- Forgotten files :-)
[packages/hdparm.git] / hdparm.init
CommitLineData
18b351a9
JK
1#!/bin/sh
2#
3# hdpram Sets up some hard drive parameters
4#
5#
6# chkconfig: 2345 5 95
7# description: hdparm is utility which can help tuning your hard drive\
8# parameters
9
10# Source function library.
11. /etc/rc.d/init.d/functions
12
13[ -x /sbin/hdparm ] || exit 0
14[ -f /etc/sysconfig/hdparm ] || exit 0
15
16. /etc/sysconfig/hdparm
17
18# See how we were called.
19case "$1" in
20 start)
21 cd /dev
22 for drive in hd? ; do
23 eval PARAMS=\${HDPARM_${drive}}
24 if [ -n "${PARAMS}" ] ; then
25 show "Setting $drive parameters"
26 busy
27 /sbin/hdparm ${PARAMS} $drive
28 deltext
29 ok
30 fi
31 done
32 touch /var/lock/subsys/hdparm
33 ;;
34 stop)
35 rm -f /var/lock/subsys/hdparm
36 ;;
37 status)
38 for drive in /dev/hd? ; do
39 hdparm $drive
40 done
41 ;;
42 *)
43 echo "Usage: $0 {start|stop|status}"
44 exit 1
45esac
46
47exit 0
This page took 0.069242 seconds and 4 git commands to generate.