svn commit: r203574 - head/etc

Doug Barton dougb at FreeBSD.org
Sun Feb 7 19:41:32 UTC 2010


On 02/06/10 20:55, Bruce Simpson wrote:
> On 07/02/2010 04:38, Doug Barton wrote:
>>
>> Are all the port numbers that have been added recently things that
>> have been requested by users? IIUC there is a cost "albeit small" for
>> parsing the /etc/services file each time it's read, so traditionally
>> we've tried to keep it as small as possible while still meeting the
>> needs of our users.
>
> I've been running sane-backends with this mod locally on all my FreeBSD
> desktop clients for some time. Given that it's been given an official
> allocation by IANA it seemed reasonable to add it to our own
> /etc/services to support this use. It's pretty essential for day-to-day
> office use of FreeBSD as a desktop system.

I'm taking from your message that you have a defined, limited goal in 
mind for adding certain ports, which I have no objection to. After all, 
developers are users too. :)

> I have a diff to add an RC script to the existing graphics/sane-backends
> port here,

Ok, a couple of comments. Overall it looks good. Although it's not 
critical you can s#%%RC_SUBR%%#/etc/rc.subr#. The first 
"saned_uid=saned" line is not needed, your default variable assignment 
is fine. However the default empty variable assignment for _flags is not 
necessary or desirable. It's better to put that information in the 
comments. See 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html 
for examples. There are a few other issues, like not doing the _flags 
warning unconditionally, etc. The attached version should work for you, 
test it of course, caveat emptor, one per person, etc.


hth,

Doug

-- 

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/

	Computers are useless. They can only give you answers.
			-- Pablo Picasso

-------------- next part --------------
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: saned
# REQUIRE: netif routing mountcritlocal
# BEFORE:  NETWORKING
#
# A sample saned startup script.
#
# Add the following line to /etc/rc.conf to enable saned:
#	saned_enable="YES"
#
# BLAH BLAH BLAH BLAH BLAH BLAH BLAH
#	saned_flags=""
#

. /etc/rc.subr

name="saned"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/${name}"

start_precmd=${name}_prestart

saned_prestart()
{
	case "${saned_flags}" in
	*-a\ *) err "saned_flags includes the -a option. Please use saned_uid instead." ;;
	esac
}

load_rc_config $name

: ${saned_enable="NO"}
: ${saned_uid="saned"}

command_args="-a $saned_uid"

run_rc_command "$1"


More information about the svn-src-all mailing list