From owner-freebsd-ports@FreeBSD.ORG Tue Jun 3 12:19:49 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D0E8106564A for ; Tue, 3 Jun 2008 12:19:49 +0000 (UTC) (envelope-from fbsd06+WR=5e652d97@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id 053088FC31 for ; Tue, 3 Jun 2008 12:19:49 +0000 (UTC) (envelope-from fbsd06+WR=5e652d97@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 2B04D23E49E; Tue, 3 Jun 2008 08:19:44 -0400 (EDT) Date: Tue, 3 Jun 2008 13:19:37 +0100 From: RW To: freebsd-ports@freebsd.org Message-ID: <20080603131937.192622ee@gumby.homeunix.com.> In-Reply-To: <765B879956FB90DA571FA609@Macintosh.local> References: <765B879956FB90DA571FA609@Macintosh.local> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Paul Schmehl Subject: Re: Problems with startup scripts X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 12:19:49 -0000 On Mon, 02 Jun 2008 22:13:15 -0500 Paul Schmehl wrote: > Imagine my surprise when I discovered that *all* of my startup > scripts=20 were running double flags! > > So, I looked at /etc/rc.subr, and lo and behold: > Line 670 of /etc/rc.subr has "$command $rc_flags $command_args" > > So, the question is, is this an error in rc_subr? Or was I > misinformed=20 about the use of cammand_args? If the former, do I > submit a PR? If the=20 latter, I have a lot of work to do. > {{{sigh}}} rc.subr seems to be self-consistent, if you look in the comments where these variables are documented. There are a number of /etc/rc.d scripts that follow similar usage, but they are mostly using flag variable names that don't match "${name}_flags". The exception is auditd which presumably would get double flags, if it were actually given any. $ grep -Ei "command_args.*=.*flags" /etc/rc.d/* /etc/rc.d/auditd:command_args="${auditd_flags}" /etc/rc.d/nfsd:command_args="${nfs_server_flags}" /etc/rc.d/ypbind:command_args="${nis_client_flags}" /etc/rc.d/yppasswdd:command_args="${nis_yppasswdd_flags}" /etc/rc.d/ypserv:command_args="${nis_server_flags}" /etc/rc.d/ypset:command_args="${nis_ypset_flags}" /etc/rc.d/ypxfrd:command_args="${nis_ypxfrd_flags}"