From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 25 20:50:02 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F70B16A469 for ; Thu, 25 Oct 2007 20:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB3C13C4AC for ; Thu, 25 Oct 2007 20:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9PKo2VP066193 for ; Thu, 25 Oct 2007 20:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9PKo20G066192; Thu, 25 Oct 2007 20:50:02 GMT (envelope-from gnats) Resent-Date: Thu, 25 Oct 2007 20:50:02 GMT Resent-Message-Id: <200710252050.l9PKo20G066192@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bruce Cran Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F1616A417 for ; Thu, 25 Oct 2007 20:45:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C83DC13C4AC for ; Thu, 25 Oct 2007 20:45:49 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9PKjKlP033784 for ; Thu, 25 Oct 2007 20:45:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9PKjKdb033783; Thu, 25 Oct 2007 20:45:20 GMT (envelope-from nobody) Message-Id: <200710252045.l9PKjKdb033783@www.freebsd.org> Date: Thu, 25 Oct 2007 20:45:20 GMT From: Bruce Cran To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/117514: [UPDATE] patch to sysutils/ataidle to fix rc script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2007 20:50:02 -0000 >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@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: 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: