Bug 113115 - ataidle 1.0 does not install rc.d script
Summary: ataidle 1.0 does not install rc.d script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-29 10:20 UTC by Erik Cederstrand
Modified: 2007-06-14 07:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Cederstrand 2007-05-29 10:20:04 UTC
ataidle 1.0 provides an rc.d startup script in the tarball, but the script is not installed. Apparently, the line:

	  install freebsd/ataidle_rc $(PREFIX)/etc/rc.d/ataidle; \

from the Makefile is not sufficient to install the rc.d script. Also, the "uninstall" part of the Makefile should probably remove the script again. It currently does not do this.

How-To-Repeat: cd /usr/ports/sysutils/ataidle
make deinstall
make install clean

ls /usr/local/etc/rc.d/ataidle

.. lists nothing
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2007-05-29 11:17:00 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

Take
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2007-06-09 12:28:13 UTC
State Changed
From-To: open->feedback

Dear maintainer can you please take a look in this pr.
Comment 3 Rebecca Cran freebsd_committer freebsd_triage 2007-06-11 20:10:05 UTC
The ports Makefile didn't have a line to install the RC script. In 
addition, a new file files/ataidle.in is required.
The following patch and ataidle.in script fixes the issue:

--- Makefile.old    2007-06-11 19:36:15.000000000 +0100
+++ Makefile 2007-06-11 20:02:19.000000000 +0100
@@ -7,6 +7,7 @@

 PORTNAME=      ataidle
 PORTVERSION=   1.0
+PORTREVISION=   1
 CATEGORIES=    sysutils
 MASTER_SITES=  http://www.cran.org.uk/bruce/software/

@@ -14,6 +15,7 @@
 COMMENT=       Utility to spin down ATA drives

 MAN8=          ataidle.8
+USE_RC_SUBR=   ataidle
 PORTDOCS=      COPYING ChangeLog README
 PLIST_FILES=   sbin/ataidle



New file: files/ataidle.in

#!/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"
#

. /etc/rc.subr

name="ataidle"
rcvar=${name}_enable
command="/usr/local/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"

--
Bruce Cran
Comment 4 Erik Cederstrand 2007-06-13 23:17:11 UTC
Bruce Cran wrote:
> The ports Makefile didn't have a line to install the RC script. In 
> addition, a new file files/ataidle.in is required.
> The following patch and ataidle.in script fixes the issue:
 > [...]

Applying this patch fixes the bug for me. Thanks!

Erik
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-06-14 07:07:28 UTC
miwi        2007-06-14 06:07:23 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/ataidle     Makefile 
  Added files:
    sysutils/ataidle/files ataidle.in 
  Log:
  - Add rc.d script
  
  PR:             113115
  Submitted by:   Bruce Cran <bruce@cran.org.uk> (maintainer)
  
  Revision  Changes    Path
  1.10      +1 -0      ports/sysutils/ataidle/Makefile
  1.1       +37 -0     ports/sysutils/ataidle/files/ataidle.in (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2007-06-14 07:07:42 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!