diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2007-10-26 13:38:21 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2007-10-26 13:38:21 +0000 |
commit | 648a7c329f6a1fa6868703047a1f50a2d70cc002 (patch) | |
tree | ed93166a972f904ad95bd211fae06cca12f534f2 | |
parent | 89e1c532552690fec5364e060cb9cf04cb6ae1fa (diff) | |
download | ports-648a7c329f6a1fa6868703047a1f50a2d70cc002.tar.gz ports-648a7c329f6a1fa6868703047a1f50a2d70cc002.zip |
Notes
-rw-r--r-- | sysutils/ataidle/Makefile | 1 | ||||
-rw-r--r-- | sysutils/ataidle/files/ataidle.in | 44 |
2 files changed, 29 insertions, 16 deletions
diff --git a/sysutils/ataidle/Makefile b/sysutils/ataidle/Makefile index b83825d54597..a18bfde85b50 100644 --- a/sysutils/ataidle/Makefile +++ b/sysutils/ataidle/Makefile @@ -7,6 +7,7 @@ PORTNAME= ataidle PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.cran.org.uk/bruce/software/ diff --git a/sysutils/ataidle/files/ataidle.in b/sysutils/ataidle/files/ataidle.in index 6c25913432f8..7464d0faea19 100644 --- a/sysutils/ataidle/files/ataidle.in +++ b/sysutils/ataidle/files/ataidle.in @@ -1,5 +1,4 @@ #!/bin/sh -# Author: <luc@2113.ch> Sep 30, 2006 # PROVIDE: ataidle # BEFORE: LOGIN @@ -7,31 +6,44 @@ # # Add the following lines to /etc/rc.conf to enable ataidle: # -#ataidle_enable="YES" # Spindown disk after 120 mins -#ataidle_device="ad1 ad2 ad3" -#ataidle_ad1="-I 60 -S 120 -A 127 -P 254 0 1" -#ataidle_ad2="-I 60 -S 120 -A 127 -P 254 1 0" -#ataidle_ad3="-I 60 -S 120 -A 127 -P 254 1 1" +# ataidle_enable (bool): set to NO by default. +# Set to YES to enable ataidle. +# ataidle_device: list of devices on which to run ataidle +# ataidle_adX: parameters to pass to ataidle(8) + +# Example: +# Put the disks ad1, ad2 and ad3 into Idle mode after 60 +# minutes and Standby mode after 120 minutes. Also, set the +# AAM and APM values to their maximum so the drives run at +# their maximum performance. +# +# ataidle_device="ad1 ad2 ad3" +# ataidle_ad1="-I 60 -S 120 -A 127 -P 254 0 1" +# ataidle_ad2="-I 60 -S 120 -A 127 -P 254 1 0" +# ataidle_ad3="-I 60 -S 120 -A 127 -P 254 1 1" # . %%RC_SUBR%% name="ataidle" rcvar=${name}_enable + command="%%PREFIX%%/sbin/${name}" +start_cmd="ataidle_start" load_rc_config $name -start_cmd="start_cmd" -start_cmd() -{ -if [ -n "${ataidle_device}" ]; then -for i in ${ataidle_device}; do -eval ataidle_args=\$ataidle_${i} -${command} ${ataidle_args} -done -fi +: ${ataidle_enable="NO"} +ataidle_start() +{ + if [ -n "${ataidle_device}" ]; then + for i in ${ataidle_device}; do + eval ataidle_args=\$ataidle_${i} + ${command} ${ataidle_args} + done + fi } -run_rc_command "$1"
\ No newline at end of file +run_rc_command "$1" + |