Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2012 03:01:41 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        Michael Scheidell <scheidell@FreeBSD.org>
Cc:        cvs-ports@FreeBSD.org, Gabor Kovesdan <gabor@FreeBSD.org>, Jarrod Sayers <jarrod@downtools.com.au>, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports MOVED ports/audio Makefile ports/audio/shoutcast Makefile distinfo pkg-descr pkg-plist ports/audio/shoutcast/files pkg-message.in shoutcast.in
Message-ID:  <4F17F815.6090606@FreeBSD.org>
In-Reply-To: <201201190123.q0J1NtDq009356@repoman.freebsd.org>
References:  <201201190123.q0J1NtDq009356@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------020500070703010700090109
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

This rc.d script is a mess, and should not have been committed in its
current form.

It seems that you didn't look at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html.
There are several items missing, several done wrong, and an empty BEFORE
line which shouldn't happen. More importantly you're using set_rcvar(),
which was removed from HEAD recently, which means that as written this
script won't work there.

Now admittedly some of the necessary changes are deeper in the weeds of
rc.d tech, but if you had compared the script as it is to what it was
supposed to be there should have been enough questions raised for you to
ask for a pre-commit review.

You're responsible for what you commit. This isn't up to acceptable
standards.

The attached version should work, but it's untested. If you're confused
about any of the changes I made look at the descriptions in
/etc/rc.subr. If that doesn't help ask in freebsd-rc@.


Doug


On 01/18/2012 17:23, Michael Scheidell wrote:
> scheidell    2012-01-19 01:23:55 UTC
> 
>   FreeBSD ports repository
> 
>   Modified files:
>     .                    MOVED 
>     audio                Makefile 
>   Added files:
>     audio/shoutcast      Makefile distinfo pkg-descr pkg-plist 
>     audio/shoutcast/files pkg-message.in shoutcast.in 
>   Log:
>   - force commit to bring shoutcast(2) into old shoutcast position
>   - shoutcast(1) removed in November
>   - MOVED entry removed, original PR asked for new port, but gabor asked for this to replace old port
>   
>   PR:             ports/154031  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=154031
>   Submitted by:   Jarrod Sayers <jarrod@downtools.com.au> (maintainer)

>   Reviewed by:    gabor,scheidell

We assume that you will review your commits before you make them, and
that those who approve commits will also review them.

>   Approved by:    maintainer, gabor (mentor)
>   
>   Revision  Changes    Path
>   1.2751    +1 -2      ports/MOVED
>   1.1204    +1 -0      ports/audio/Makefile
>   1.20      +79 -0     ports/audio/shoutcast/Makefile (new)
>   1.8       +2 -0      ports/audio/shoutcast/distinfo (new)
>   1.3       +13 -0     ports/audio/shoutcast/files/pkg-message.in (new)
>   1.1       +45 -0     ports/audio/shoutcast/files/shoutcast.in (new)
>   1.4       +6 -0      ports/audio/shoutcast/pkg-descr (new)
>   1.3       +21 -0     ports/audio/shoutcast/pkg-plist (new)
> 
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/MOVED.diff?&r1=1.2750&r2=1.2751&f=u
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/Makefile.diff?&r1=1.1203&r2=1.1204&f=u
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/Makefile
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/distinfo
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/files/pkg-message.in
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/files/shoutcast.in
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/pkg-descr
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/audio/shoutcast/pkg-plist
> 



-- 

	It's always a long day; 86400 doesn't fit into a short.

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


--------------020500070703010700090109
Content-Type: text/plain;
 name="shoutcast.in"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="shoutcast.in"

#!/bin/sh

# $FreeBSD: ports/audio/shoutcast/files/shoutcast.in,v 1.1 2012/01/19 01:23:55 scheidell Exp $
#
# PROVIDE: shoutcast
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable SHOUTcast:
# shoutcast_enable (bool):    Set to "NO" by default.
#                             Set it to "YES" to enable SHOUTcast.
# shoutcast_configfile (str): Set to "%%PREFIX%%/%%ETCDIR%%/sc_serv.conf" by default.
# shoutcast_user (str):       Set to %%SHOUTCASTUSER%% by default
# shoutcast_chdir (str):      Set to %%SHOUTCASTDIR%% by default

. /etc/rc.subr

name=shoutcast
rcvar=shoutcast_enable

load_rc_config shoutcast

: ${shoutcast_enable:="NO"}
: ${shoutcast_user:="%%SHOUTCASTUSER%%"}
: ${shoutcast_chdir:="%%SHOUTCASTDIR%%"}

command="%%PREFIX%%/sbin/sc_serv"
shoutcast_logfile="/var/log/sc_serv.log"

required_dirs="${shoutcast_chdir}"
required_files="${shoutcast_configfile:="%%PREFIX%%/%%ETCDIR%%/sc_serv.conf"}"

command_args="${required_files} >/dev/null 2>&1 &"

start_precmd="shoutcast_prestart"

shoutcast_prestart()
{
  touch ${shoutcast_logfile}
  chown %%SHOUTCASTUSER%%:wheel ${shoutcast_logfile}
  chmod 0640 ${shoutcast_logfile}
}

run_rc_command "$1"

--------------020500070703010700090109--



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