ports/117514: [UPDATE] patch to sysutils/ataidle to fix rc script
Bruce Cran
bruce at cran.org.uk
Thu Oct 25 20:50:02 UTC 2007
>Number: 117514
>Category: ports
>Synopsis: [UPDATE] patch to sysutils/ataidle to fix rc script
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 25 20:50:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Bruce Cran
>Release: 7.0-CURRENT
>Organization:
>Environment:
FreeBSD muon.draftnet 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Mon Oct 8 21:52:59 BST 2007 brucec at muon.draftnet:/usr/obj/usr/src/sys/INSPIRON amd64
>Description:
The attached patch updates sysutils/ataidle to 1.0_1; it fixes the rc script to remove the warning when ataidle_enable isn't set.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- Makefile.old 2007-06-14 07:07:23.000000000 +0100
+++ Makefile 2007-10-25 21:10:18.000000000 +0100
@@ -7,6 +7,7 @@
PORTNAME= ataidle
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.cran.org.uk/bruce/software/
--- files/ataidle.in.old 2007-06-14 08:38:50.000000000 +0100
+++ files/ataidle.in 2007-10-25 21:35:18.000000000 +0100
@@ -1,5 +1,4 @@
#!/bin/sh
-# Author: <luc at 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"
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list