Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2008 11:33:40 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        "Philip M. Gollucci" <pgollucci@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/audio/autocd Makefile ports/audio/autocd/files autocd.in autocd.sh
Message-ID:  <48920584.6050504@FreeBSD.org>
In-Reply-To: <200807311612.m6VGC3Gq004114@repoman.freebsd.org>
References:  <200807311612.m6VGC3Gq004114@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Sorry to say, this script is still a bit of a mess. I've attached a 
suggested revision. See the chapter on rc scripts in the porter's 
handbook for more information.


hth,

Doug


Philip M. Gollucci wrote:
> pgollucci    2008-07-31 16:12:03 UTC
> 
>   FreeBSD ports repository
> 
>   Modified files:
>     audio/autocd         Makefile 
>   Added files:
>     audio/autocd/files   autocd.in 
>   Removed files:
>     audio/autocd/files   autocd.sh 
>   Log:
>   - fully utilize USE_RC_SUBR
>     itectu@: no more .sh
>     dougb@: move load_config above variables checks
>   - Bump PORTREVISION
>   
>   PR:             ports/125623  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=125623
>   Approved by:    maintainer, gabor (mentor)
>   
>   Revision  Changes    Path
>   1.13      +2 -8      ports/audio/autocd/Makefile
>   1.1       +38 -0     ports/audio/autocd/files/autocd.in (new)
>   1.3       +0 -38     ports/audio/autocd/files/autocd.sh (dead)
> 
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/autocd/Makefile.diff?&r1=1.12&r2=1.13&f=h
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/autocd/files/autocd.in
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/autocd/files/autocd.sh
> 


-- 

     This .signature sanitized for your protection


[-- Attachment #2 --]
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: autocd
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable autocd:
#
# autocd_enable="YES"
#
# See autocd(8) for relevant values for autocd_flags
#

. %%RC_SUBR%%

name=autocd
rcvar=${name}_enable

command=%%PREFIX%%/sbin/autocd

stop_cmd=${name}_stop

autocd_stop ()
{
	%%PREFIX%%/bin/cdctl die
}

load_rc_config $name

autocd_enable=${autocd_flags-NO}

run_rc_command "$1"

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48920584.6050504>