diff options
author | miwi <miwi@FreeBSD.org> | 2007-06-14 14:07:23 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-06-14 14:07:23 +0800 |
commit | e6341e33d1309f364e514c0f462c63c919b8ef1b (patch) | |
tree | 8deddb5b70234e1af8eaefd83b8c0a7dccc383aa /sysutils | |
parent | 2ca30aa155798f6f6aad8445dd00530703f4fdf7 (diff) | |
download | freebsd-ports-gnome-e6341e33d1309f364e514c0f462c63c919b8ef1b.tar.gz freebsd-ports-gnome-e6341e33d1309f364e514c0f462c63c919b8ef1b.tar.zst freebsd-ports-gnome-e6341e33d1309f364e514c0f462c63c919b8ef1b.zip |
- Add rc.d script
PR: 113115
Submitted by: Bruce Cran <bruce@cran.org.uk> (maintainer)
Diffstat (limited to 'sysutils')
-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 |