diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-06-14 06:07:23 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-06-14 06:07:23 +0000 |
commit | b354abac1f1c4fb2955f81aa529c17aefb64daf4 (patch) | |
tree | bae5f8b6ff89eab8f3979dd7c4e9f7c6a522639d /sysutils/ataidle | |
parent | f1b40e5cd9858d42e123f9fa4e411fe73c8968b2 (diff) |
Notes
Diffstat (limited to 'sysutils/ataidle')
-rw-r--r-- | sysutils/ataidle/Makefile | 1 | ||||
-rw-r--r-- | sysutils/ataidle/files/ataidle.in | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/sysutils/ataidle/Makefile b/sysutils/ataidle/Makefile index bb968fe16c9e..b83825d54597 100644 --- a/sysutils/ataidle/Makefile +++ b/sysutils/ataidle/Makefile @@ -13,6 +13,7 @@ MASTER_SITES= http://www.cran.org.uk/bruce/software/ MAINTAINER= bruce@cran.org.uk COMMENT= Utility to spin down ATA drives +USE_RC_SUBR= ${PORTNAME} MAN8= ataidle.8 PORTDOCS= COPYING ChangeLog README PLIST_FILES= sbin/ataidle diff --git a/sysutils/ataidle/files/ataidle.in b/sysutils/ataidle/files/ataidle.in new file mode 100644 index 000000000000..13bba00cf481 --- /dev/null +++ b/sysutils/ataidle/files/ataidle.in @@ -0,0 +1,37 @@ +#!/bin/sh +# Author: <luc@2113.ch> Sep 30, 2006 + +# PROVIDE: ataidle +# BEFORE: LOGIN + +# +# 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" +# + +. %%RC_SUBR%% + +name="ataidle" +rcvar=${name}_enable +command="%%LOCALBASE%%/sbin/${name}" + +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 + +} + +run_rc_command "$1"
\ No newline at end of file |