From owner-cvs-src@FreeBSD.ORG Wed Jun 21 11:36:39 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED59A16A47C; Wed, 21 Jun 2006 11:36:39 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep16-int.chello.at (viefep14-int.chello.at [213.46.255.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 576E743D5A; Wed, 21 Jun 2006 11:36:37 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep16-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060621113636.GMEE2116.viefep16-int.chello.at@wombat.fafoe.narf.at>; Wed, 21 Jun 2006 13:36:36 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 0D41CBC77; Wed, 21 Jun 2006 13:17:16 +0200 (CEST) Date: Wed, 21 Jun 2006 13:17:16 +0200 From: Stefan Farfeleder To: Florent Thoumie Message-ID: <20060621111716.GI846@wombat.fafoe.narf.at> References: <200606210942.k5L9gtAi060504@repoman.freebsd.org> <1150883785.3467.4.camel@mayday.esat.net> <20060621105253.GE45947@comp.chem.msu.su> <1150887909.3467.18.camel@mayday.esat.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1150887909.3467.18.camel@mayday.esat.net> User-Agent: Mutt/1.5.11 Cc: Yar Tikhiy , src-committers@FreeBSD.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src/etc rc.subr src/share/man/man8 rc.subr.8 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 11:36:40 -0000 On Wed, Jun 21, 2006 at 12:05:09PM +0100, Florent Thoumie wrote: > > Then I'm not sure what script would benefit from this function. Can you > point me to an example? > > > > I don't have a particular feeling against your function but it uses > > > commands that may not be available early enough (getopt, egrep). While > > > it's easy to remove the getopt dependency (see rc.d/mdconfig), it's not > > > the case for egrep. > > > > It's POSIX getopts, which ought to be a shell built-it by its design. > > egrep is used with -e only, one can avoid using it if egrep isn't > > available yet. The only issue is true and false, I was sure they > > were in /bin, but it can be fixed easily. true and false are builtins for /bin/sh. > > Still, with /bin/sh, getopt isn't a builtin: getopt != getopts > $ sh -c 'which getopt' > /usr/bin/getopt /bin/sh doesn't have a which builtin, so you are executing /usr/bin/which which just looks in $PATH. Try 'type getopts'. Stefan